name_servers= from resolvconf.conf are not prepended, they're used alone

name_servers= from resolvconf.conf are not prepended, they're used alone

I enabled rc-manager=resolvconf in NetworkManager.conf and now resolvconf is used to maintain resolv.conf. Currently, I have just one wired connection and my dhcp server returns 2 search domains and 4 name servers and with the default resolvconf configuration they are all added to resolv.conf.

I have a standalone dnsmasq and according to RESOLVCONF.CONF(5):

 name_servers
         Prepend name servers to the dynamically generated list.  You should 
         set this to 127.0.0.1 if you use a local name server other than libc.

So I uncommented name_servers=127.0.0.1 in resolvconf.conf, but now, when I enable the connection in NetworkManager only the search domains are updated in resolv.conf in accordance with DHCP settings. As for the name servers, just a single line is always present in the file:

nameserver 127.0.0.1

Why doesn't resolvconf append the four other name servers to it?

This is the captured args and stdin from NetworkManager:

/usr/bin/resolvconf -a NetworkManager <<'EOF'
# Generated by NetworkManager
search domain1.com,domain2.com reallin.basin
nameserver 10.14.33.139
nameserver 10.14.33.140
nameserver 192.168.149.11
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 192.168.110.11
EOF

Actually, I didn't want to enable resolvconf. All I wanted was to prepend 127.0.0.1 to the name servers added from DHCP by NetworkManager, but I couldn't figure out how to do this with rc-manager=symlink which is the default.

Antwort1

To make it work I had to add the other setting:

resolv_conf_local_only=NO

Surprisingly, it is YES by default.

verwandte Informationen