[Dnsmasq-discuss] Unable to resolve public/external hostnames

Don Muller don at djmuller.com
Sun Jun 9 14:16:30 BST 2013


What is the address of the server running DNSMASQ? Unless I missed it it doesn't look like you include it in your DHCP options.  

Don

On Jun 9, 2013, at 3:31 AM, Koos Pol <koos2013 at pohw.nl> wrote:

> Goodmorning all,
> 
> 
> I've shot myself in the foot by purchasing a new router without a DNS *server*
> aboard (Netgear WNDR4500). (For which I'm now in a lengthy, difficult
> discussion with Netgear support. Why doesn't a consumer grade router doesn't
> do local name resolution? But that's an entire different subject)
> 
> Since the router doesn't have a DNS server aboard, I thought to use dnsmasq
> for local LAN name resolution. (Saves me from deploying hosts files all over
> the place.)
> 
> The problem is that local name resolution works like a charm, but I can't get
> external/public resolution to work. Pinging to public IPs works fine. It's the
> name resolution which fails.
> 
> Here's my setup (small home lan):
> 
> LAN: 192.168.1.255/24
> Router/gw: x.x.x.1
> dns1     : x.x.x.50
> 
> 
> On dns1 I have the following configuration:
> /etc/dnsmasq.conf:
> resolv-file=/etc/resolv.dnsmasq
> domain-needed
> bogus-priv
> domain=lan.pohw.nl
> expand-hosts
> local=/lan.pohw.nl/
> dhcp-option=option:router,192.168.1.1
> dhcp-range=192.168.1.100,192.168.1.200
> log-queries
> 
> /etc/resolv.dnsmasq:
> nameserver 8.8.8.8
> nameserver 8.8.4.4
> 
> 
> client1 is configured as follows:
> /etc/resolv.conf:
> nameserver 192.168.1.50
> 
> 
> Pinging from client1 to a public IP works fine:
> client1:/home/koos # ping -c 3 62.69.166.18
> PING 62.69.166.18 (62.69.166.18) 56(84) bytes of data.
> 64 bytes from 62.69.166.18: icmp_seq=1 ttl=248 time=6.00 ms
> 64 bytes from 62.69.166.18: icmp_seq=2 ttl=248 time=5.94 ms
> 64 bytes from 62.69.166.18: icmp_seq=3 ttl=248 time=5.60 ms
> 
> But pinging to a public hostname doesn't:
> client1:/home/koos # ping -c 3 www.nu.nl
> ping: unknown host www.nu.nl
> 
> The dnsmasq log is as follows:
> Jun  9 08:50:52 dns1 dnsmasq[1435]: dnsmasq: syntax check OK.
> Jun  9 08:50:52 dns1 dnsmasq[1438]: started, version 2.61 cachesize 150
> Jun  9 08:50:52 dns1 dnsmasq[1438]: compile time options: IPv6 GNU-getopt
> no-DBus i18n IDN DHCP DHCPv6 no-Lua TFTP no-conntrack
> Jun  9 08:50:52 dns1 dnsmasq[1438]: DBus support enabled: connected to system bus
> Jun  9 08:50:52 dns1 dnsmasq-dhcp[1438]: DHCP, IP range 192.168.1.100 --
> 192.168.1.200, lease time 1h
> Jun  9 08:50:52 dns1 dnsmasq[1438]: using local addresses only for domain
> lan.pohw.nl
> Jun  9 08:50:52 dns1 dnsmasq[1438]: reading /etc/resolv.dnsmasq
> Jun  9 08:50:52 dns1 dnsmasq[1438]: using nameserver 8.8.4.4#53
> Jun  9 08:50:52 dns1 dnsmasq[1438]: using nameserver 8.8.8.8#53
> Jun  9 08:50:52 dns1 dnsmasq[1438]: using local addresses only for domain
> lan.pohw.nl
> Jun  9 08:50:52 dns1 dnsmasq[1438]: read /etc/hosts - 8 addresses
> Jun  9 08:51:45 dns1 dnsmasq-dhcp[1438]: DHCPDISCOVER(eth0) 08:00:27:c7:bc:61
> Jun  9 08:51:45 dns1 dnsmasq-dhcp[1438]: DHCPOFFER(eth0) 192.168.1.154
> 08:00:27:c7:bc:61
> Jun  9 08:51:45 dns1 dnsmasq-dhcp[1438]: DHCPREQUEST(eth0) 192.168.1.154
> 08:00:27:c7:bc:61
> Jun  9 08:51:45 dns1 dnsmasq-dhcp[1438]: DHCPACK(eth0) 192.168.1.154
> 08:00:27:c7:bc:61 client1
> Jun  9 08:52:08 dns1 dnsmasq[1438]: query[PTR] 101.1.168.192.in-addr.arpa from
> 192.168.1.154
> Jun  9 08:52:08 dns1 dnsmasq[1438]: config 192.168.1.101 is NXDOMAIN-IPv4
> Jun  9 08:53:45 dns1 dnsmasq[1438]: query[A] www.nu.nl from 192.168.1.154
> Jun  9 08:53:45 dns1 dnsmasq[1438]: query[A] www.nu.nl from 192.168.1.154
> Jun  9 08:53:45 dns1 dnsmasq[1438]: query[A] www.nu.nl.lan.pohw.nl from
> 192.168.1.154
> Jun  9 08:53:45 dns1 dnsmasq[1438]: config www.nu.nl.lan.pohw.nl is NXDOMAIN-IPv4
> 
> 
> I'd appreciate any help!
> 
> Many thanks.
> Koos
> 
> 
> PS: The thread explaining a similar problem is here[1]. I've read it through
> but none of the suggestions worked for me.
> 
> [1] http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2011q3/005199.html
> 
> -- 
> http://www.malarianomore.org
> For $10 a mosquito net + distribution + education + monitoring + evaluation.
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



More information about the Dnsmasq-discuss mailing list