Preventing NetworkManager from overwriting /etc/resolv.conf
Because /etc/resolv.conf is managed by NetworkManager service, any manual changes to the file are overwritten when the network service is restarted. To prevent this, change the value of dns parameter to none in /etc/NetworkManager/NetworkManager.conf:
- Edit /etc/resolv.conf file
- Add
dns=noneunder the[main]section in/etc/NetworkManager/NetworkManager.conf. - Restart the
NetworkManagerservice