09.01.2017 01:34, Carlos E. R. пишет:
Otherwise, what would be the correct method of configuring dnsmasq? The
You know very well that the answer is "it depends".
/etc/resolv file has to point to the local server, and the local server has to know the address of the upstream relay.
NetworkManager can do it for you automatically.
For instance, network manager likes to modify the /etc/resolv.conf file, perhaps with upstream servers. These may change per connection, specially for a laptop. But this can not be allowed when one is using dnsmasq, it has to point always to localhost.
Then tell NM to manage dnsmasq and do not start it manually. You get exactly the desired behavior you describe above.
Instead one has to configure the remote upstream servers as fixed in /etc/dnsmasq.conf, independent of the network the machine is connected at the time.
Well, you can also tell your dnsmasq to use resolv.conf generated by NM and tell NM to not update system-wide resolv.conf. There is more than one way to skin a cat ...