I've recently noted that my /etc/resolve.conf.head
and /resolve.conf.tail
files were being ignored by NetworkManager DNS changes.
How to make use of them to add defaults nameserver configuration when using NM?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityNetwork Manager can use several tools to determine DNS. By default it replaces /etc/resolv.conf
itself unless it is a symlink, thus ignoring .head|.tail
files.
You should update NM configuration to use resolveconf
util to update DNS configuration.
Change /etc/NetworkManager/NetworkManager.conf
and add:
[main]
rc-manager=resolvconf
Then restart NM with systemctl restart NetworkManager
.
See "man 5 NetworkManager.conf" for details.
Linux will always use resolvconf for the DNS by default
You can just disable DNS handling on Network Manager with
/etc/NetworkManager/conf.d/no-dns.conf
[main]
dns=none