09.01.2017 20:42, Carlos E. R. пишет:
On 2017-01-09 18:18, Andrei Borzenkov wrote:
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.
Yes, that is what I was and I am doing.
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.
Tell NM do manage dnsmasq? How?
Have you tried "man NetworkManager.conf"? bor@bor-Latitude-E5450:~/src/NetworkManager$ grep dns /etc/NetworkManager/NetworkManager.conf dns=dnsmasq
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 ...
Unless NM can generate a differently named resolv.conf file, I don't see how.
Sorry, I was wrong here, this was added in NM 1.2.0, Leap has 1.0.x still.