Home » , » DHCP client overwriting resolv.conf how to stop it on linux

DHCP client overwriting resolv.conf how to stop it on linux

Written By 1 on Monday, November 25, 2013 | 10:35 PM

prevent resolv.conf updates only, the fastest way is to redefine the function to do nothing:
create flowing file 
# cat /etc/dhclient-enter-hooks
make_resolv_conf() {
exit 0
}
Then save the file and ensure it is executable:
# chmod a+x /etc/dhclient-enter-hooks
Note that, as explained in the man page, the dhclient-script is not standard so if this configuration doesn’t work, please read the man page.

0 Comment:

Post a Comment