Stop /etc/resolv.conf from being updated automaticallyRecently I realized that my changes to /etc/resolve.conf
always got overwritten upon system reboot, after searching the web for a while I found the solution from StackExchange:
Ubuntu 16.04
If the network interfaces for your server instance is controlled by DHCP, the dhclient program will overwrite your /etc/resolv.conf
file whenever the networking service is restarted.
After adding the following to /etc/dhcp/dhclient.conf
, now my preference persists:
1 supersede domain-name-servers 1.1.1.1, 8.8.8.8, 9.9.9.9;
Recently I realized that my changes to /etc/resolve.conf
always got overwritten upon system reboot, after searching the web for a while I found the solution from StackExchange:
Ubuntu 16.04
If the network interfaces for your server instance is controlled by DHCP, the dhclient program will overwrite your/etc/resolv.conf
file whenever the networking service is restarted.
After adding the following to /etc/dhcp/dhclient.conf
, now my preference persists:
1 | supersede domain-name-servers 1.1.1.1, 8.8.8.8, 9.9.9.9; |