[Dnsmasq-discuss] dns/resolv.conf shoud follow DNS server as learned via DHCP
dcbw at redhat.com
Sun Mar 5 17:43:14 GMT 2017
On Sat, 2017-03-04 at 10:41 +0100, Rene Stoutjesdijk wrote:
> i did setup the dnsmasq to be the dns server/resolver for my clients.
> this works fine when i say that the resolver (at my dnsmasq server)
> pointing towards 188.8.131.52
> However, my uplink router and ISP could change, so what i'm looking
> for now
> is that the resolver doesn't point anymore to the 184.108.40.206 but follows
> DNS server which i do get provided automatically by the ISP router
> (as the
> interface between the local host and the router is DHCP derived).
> ( i know it could stil work with the 220.127.116.11 but i want to explore
> Can this be achieved within dnsmasq? and if yes how.
dnsmasq should be doing this already, unless you've given it the --no-
poll option. 'man dnsmasq' says "Unless --no-poll is used, dnsmasq
checks the modification time of /etc/resolv.conf (or equivalent if --
resolv-file is used) and re-reads it if it changes."
But to debug a bit further, when you notice that dnsmasq isn't using
the same nameserver as in resolv.conf, try 'killall -HUP dnsmasq' and
see if that helps things. dnsmasq will reread resolv.conf when sent
the HUP signal.
More information about the Dnsmasq-discuss