I'm running Debian Jessie and I'm trying to configure dnsmasq as a caching DNS server. I used a guide to come up with the following
listen-address=127.0.0.1 bind-interfaces domain-needed bogus-priv no-hosts dns-forward-max=150 cache-size=1000 neg-ttl=3600 resolv-file=/etc/resolv.dnsmasq no-poll
sudo service dnsmasq restart fails and it won't start, telling me
Mar 26 17:13:01 user dnsmasq: dnsmasq: syntax check OK. Mar 26 17:13:01 user dnsmasq: dnsmasq: only one resolv.conf file allowed in no-poll mode.
Ok, kind of strange that a config straight out of a guide failed. I'll just remove the
no-poll option to see if it works. This time it starts just fine, but DNS resolution is clearly failing. Relevant files:
The third file appears to be dnsmasq's live resolv.conf file, because adding a nameserver line to it while dnsmasq is already running causes DNS resolution to immediate start working. So it looks like it ignored my
/etc/resolv.dnsmasq. I also tried adding a nameserver line to my
/etc/resolv.conf and removing the
resolv-file line in
/etc/dnsmasq.conf, but it gets overwritted immediately to what you see above upon doing
sudo service dnsmasq restart.
What is going on with dnsmasq and do I configure dnsmasq as a caching DNS server?