I have dnsmasq setup for my network, the server it runs on is configured like this:
/etc/resolv.conf
Code:
domain localdomain
search localdomain
nameserver=127.0.0.1
/etc/hosts
Code:
127.0.0.1 localhost
127.0.1.1 server
192.168.1.1 server
192.168.1.51 host1
192.168.1.52 host2
192.168.1.53 host3
.....
192.168.2.1 modem
/etc/dnsmasq.conf (eth1 is my external interface)
Code:
domain-needed
bogus-priv
filterwin2k
except-interface=eth1
resolv-file=/etc/resolv.openDNS
log-queries
log-facility=/var/log/dnsmasq
/etc/resolv.openDNS
Code:
search localdomain
nameserver 208.67.222.222
nameserver 208.67.220.220
The server uses itself to look up addresses, dnsmasq is configured to use a different resolv file than the default.
So whether the query comes from the network or the server dnsmasq will be doing all the work and using OpenDNS to resolve it, then it will cache the result.
The problem is when the server tries to resolve hosts on the local domain. In my log file I see this:
Quote:
Dec 14 13:01:01 dnsmasq[13229]: query[AAAA] server.localdomain from 127.0.0.1
Dec 14 13:01:01 dnsmasq[13229]: forwarded server.localdomain to 208.67.222.222
|
From the documentation I have read about dnsmasq it should look up the cache first, then the /etc/hosts file next, then the DHCP leases file and lastly it should query the external dns server.
My question is, how do I stop dnsmasq forwarding the query's for the localdomain to the external server and resolve them itself?