Brad Langhorst wrote:
I'm switching from tinydns + dnscache + dhcp server to dnsmasq.
Sometimes lookups seem to return the local server's ip address for
external name lookups.
eg:
amazon-images.blahblah.com resolves to 192.168.10.2 (huh?)
maybe i've misconfigured something?
the problem seems to be much worse on my wife's os X 10.5 computer than
on my linux machines.
If I configure dnsmasq to feed the existing dnscache server as a dhcp
option 6, this problem does not manifest. That dnsmasq server the
upstream server that dnsmasq uses when it's cache is empty.
here's my config:
domain-needed
bogus-priv
server=192.168.10.1
local=/home.langhorst.com/
address=/langhorst.com/192.168.10.2
address=/langhorst.dyndns.org/192.168.10.2
address=/bottle.home.langhorst.com/192.168.10.1
expand-hosts
domain=home.langhorst.com
dhcp-range=192.168.10.50,192.168.10.150,12h
dhcp-host=00:0d:93:4e:64:f8,charm,192.168.10.16
dhcp-host=00:16:41:57:F7:C5,up,192.168.10.13
# default router - 3
# DNS server - 6
dhcp-option=3,192.168.10.1
dhcp-option=6,192.168.10.1
dhcp-authoritative
How is the resolver set up on your clients? For Linux the config is in
/etc/resolv.conf, Macs have something different, I guess.
I suspect you have something like
search langhorst.com
in /etc/resolv.conf.
Now, if for some reason, resolving www.google.com fails (like, a flaky,
overloaded DNS server at your ISP) then the resolver code will try
again, with the name
www.google.com.longhorst.com
That's caught be the line in /etc/dnsmasq.conf
address=/langhorst.com/192.168.10.2
and you get the answer 192.168.0.2
Setting the --log-queries option in dnsmasq should allow you to see
exactly what's happening.
Cheers,
Simon.