Network manager keeps modifying resolve.conf and there is no stopping it in Ubuntu 18.04. I tried removing write permissions, change resolve.conf symlink to another file and... I also looked at network manager: how to stop nm updating /etc/resolv.conf but none of the solutions seems to be working in this Ubuntu version.
1 Answer
There are various ways to configure NM not to touch /etc/resolv.conf
:
[main]
dns=none
or (better)
[main]
rc-manager=unmanaged
in NetworkManager.conf. See man NetworkManager.conf
.
You can also set rc-manager=symlink
, and make /etc/resolv.conf
a symlink pointing to a file (like systemd-resolved's stub resolve.conf). Well, you said, you tried this. Unclear, why that wouldn't work for you.
Or, you make the file immutable, with chattr +i /etc/resolv.conf
.
-
I'd love your help on this related question. Thanks! askubuntu.com/questions/1453982/…– RyanFeb 8, 2023 at 3:23