On 2017-01-08 18:56, Andrei Borzenkov wrote:
08.01.2017 20:50, Carlos E. R. пишет: ...
You have loop here.
Yes, but where?
<3.6> 2017-01-08 17:24:01 minas-tirith dnsmasq 3580 - - reading /etc/resolv.conf <3.6> 2017-01-08 17:24:01 minas-tirith dnsmasq 3580 - - using nameserver 8.8.4.4#53 <3.6> 2017-01-08 17:24:01 minas-tirith dnsmasq 3580 - - using nameserver 8.8.8.8#53 <3.6> 2017-01-08 17:24:01 minas-tirith dnsmasq 3580 - - using nameserver 127.1.1.1#53
See -r and -R options of dnsmasq.
-r, --resolv-file=<file> Read the IP addresses of the upstream nameservers from <file>, instead of /etc/resolv.conf. For the format of this file see resolv.conf(5). The only lines relevant to dnsmasq are sameserver ones. Dnsmasq can be told to poll more than one resolv.conf file, the first file name specified overrides the default, subsequent ones add to the list. This is only allowed when polling; the file with the currently latest modification time is the one used. -R, --no-resolv Don't read /etc/resolv.conf. Get upstream servers only from the command line or the dnsmasq configuration file. Ah, interesting, thanks. I would then use the configuration file option: # If you don't want dnsmasq to read /etc/resolv.conf or any other # file, getting its servers from this file instead (see below), then # uncomment this. #no-resolv because a command line option means altering the systemd config file. Otherwise, what would be the correct method of configuring dnsmasq? The /etc/resolv file has to point to the local server, and the local server has to know the address of the upstream relay. 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. 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. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)