On Fri, Dec 06, 2019 at 04:42:18PM +0100, Dick Visser wrote: > I'm struggling to add custom nameservers to /etc/resolv.conf. > The file gets overwritten on reboot, but I can't find out where this is done. > Any ideas?
On our cloud images, resolv.conf is managed by dhclient, which is invoked by ifup and is responsible for setting up the network interfaces based on DHCP negotiation with a remote service provided by the cloud provider. The /sbin/dhclient-script shell script contains a function make_resolv_conf(), which generates and installs the new resolv.conf. If needed, you can redefine that function by placing a script fragment in /etc/dhcp/dhclient-enter-hooks.d/ noah