One of my basic pet-peeves has been dhclient’s meddling with /etc/resolv.conf. I run my own resolvers and don’t like using ISP nameservers, which are often overloaded. Today I finally looked deeply enough into this to solve the issue on Debian/Ubuntu. Just add the following to /etc/dhcpd3/dhclient-enter-hooks.d/resolvconf.
# For safety, undefine the nasty default make_resolv_conf()
make_resolv_conf() {
true
}
On FreeBSD/NetBSD the same can be accomplished by adding the above code to /etc/dhclient-enter-hooks. This overrides the default function used by dhclient with one that does nothing. Nice, clean, simple.