Hi, I'm just compiling and installed KAMIKAZE (bleeding edge, r9644) on WGT634U,
I'm using a DHCP broadband ISP, however seems dnsmasq in openwrt has bugs in
forwarding DNS queries, that is, if client PC was assigned the router ip 192.168.1.1
as DNS server, the DNS queries did not work, so the client PC could only use ip to
access internet. I have to config manually the real DNS server ip.
When I use kamikaze 7.09, I find a setting that could let dnsmasq assign predefined real
DNS server ip to client pc via DHCP, but in the latest r9644 development version I could
not find where to set the predefined real DNS server ip, could somebody tell me
where to set it?
Topic: How to config dnsmasq to assign DNS server IP to client?
The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
/etc/dnsmasq.conf
The last line should be a comment to the effect
dhcp-option=6,IP_OF_DNS1,IP_OF_DNS2
Well, in latest trunk the complete dnsmasq configuration can be done via UCI in /etc/config/dhcp.
Look at /etc/config/dhcp and /etc/init.d/dnsmasq.
Well, in latest trunk the complete dnsmasq configuration can be done via UCI in /etc/config/dhcp.
Look at /etc/config/dhcp and /etc/init.d/dnsmasq.
right, in latest trunk I could not find the /etc/dnsmasq.conf
but after look into the /etc/config/dhcp I still don't know how to set:
1 config dnsmasq
2 option domainneeded 1
3 option boguspriv 1
4 option filterwin2k '0' #enable for dial on demand
5 option localise_queries 1
6 option local '/lan/'
7 option domain 'lan'
8 option expandhosts 1
9 option nonegcache 0
10 option authoritative 1
11 option readethers 1
12 option leasefile '/tmp/dhcp.leases'
13 option resolvfile '/tmp/resolv.conf.auto'
14
15 config dhcp
16 option interface lan
17 option start 100
18 option limit 150
19 option leasetime 12h
option dnsserver dns_ip1 dns_ip2 #is it right?
20
21 config dhcp
22 option interface wan
23 option ignore 1
When using DHCP (or PPPoE) for WAN, the real DNS are put in /tmp/resolv.conf.auto
DNSMASQ will read this file for its own use.
But for its DHCP clients over LAN, it will send the OpenWRT LAN IP as DNS to be use (so itself) because clients only need to sned their DNS queries to DNSMASQ.
So there is no need to configure anything for DNS...
When using DHCP (or PPPoE) for WAN, the real DNS are put in /tmp/resolv.conf.auto
DNSMASQ will read this file for its own use.
But for its DHCP clients over LAN, it will send the OpenWRT LAN IP as DNS to be use (so itself) because clients only need to sned their DNS queries to DNSMASQ.So there is no need to configure anything for DNS...
Right, that's how DNSMASQ works by default, but that doesn't work here, don't know it's bug of DNSMASQ or bug of my ISP, any way, when it works in that way, I could resolve domain name in router but could not resolve domain name in client PC.
So my work around is to assign client PC the real DNS server ip, but it's trouble to manually set client PC every time I connect to internet, so I want DHCP to assign specific DNS server ip to client PC, am I clear?
I have
uci set dhcp.cfg.options=-O lan,6,192.168.5.75
which is easily done through the web interface.
If anyone is attempting to use DHCP to pass name servers back to a client in Kamikaze 8.09, here's the UCI configuration in /etc/config/dhcp to accomplish it.
config 'dhcp' 'lan'
option 'dhcp_option' 'lan,6,ip#1,ip#2'
This can also be done through the 8.09 webif under network > dhcp > add DHCP-Options
I have a problem with my dns. Sometimes they work correctly, but sometimes not (both in dns clients and server). One friend told me to add the dns option to every interface in network. I have 3 valid interfaces, one for internet and two for wireless, so i put my isp dns in eth0 and in ath0 & ath1 the same dns values of the wireless. I configured the /etc/config/dhcp manually and i put in domain 'daemon.awmn' and in lan the '/lan/'. I am not quite sure if these values are correct, but from the results of traceroutes are correct. After that the /tmp/resolv.conf is
search daemon.awmn
nameserver 127.0.0.1
.
The resolv.conf.auto includes
nameserver 10.19.143.12
nameserver 10.19.143.13
nameserver 194.177.210.10
nameserver 194.177.210.211
root@daemon:
The first two are of the wireless and the second two of the isp-internet. Last, the /etc/resolv.con
nameserver 127.0.0.1
Can anyone see any problem in the configuration, there is sure sth because my dns are not working properly.
The discussion might have continued from here.