1

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?

2 Answers 2

2

Network 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.

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .