[Solved] Dnsmasq resolv.conf inconsitent

Is it really correct that dnsmasq by default uses /tmp/resolv.conf.auto
and all other linux progs (i.e. nslookup) using /etc/resolv.conf linked to /tmp/resolv.conf ?
Exists in 17.01.x and master

Yes it is. Dnsmasq reads its upstream servers from /tmp/resolv.conf.auto while all other local processes are supposed to query dnsmasq for names, hence the nameserver 127.0.0.1 in /etc/resolv.conf.

If dnsmasq would use /etc/resolv.conf it'd query itself and not be able to use internet servers, if all local services would use /tmp/resolv.conf.auto, they'd bypass dnsmasq and thus lose DNS caching and access to locally configured and DHCP assigned hostnames.

1 Like