Preventing NetworkManager from overwriting /etc/resolv.conf
As the /etc/resolv.conf file is managed by NetworkManager service, any manual changes made in the file after the restart of network service will be overwritten. To prevent this, there are some steps:
- Edit /etc/resolv.conf file
- Add
dns=none
under the[main]
section in/etc/NetworkManager/NetworkManager.conf
. - Restart the
NetworkManager
service