How to keep dhclient from nuking /etc/resolv.conf

http://www.netbsd.org/docs/network/dhcp.html tells you the how-to.

In Ubuntu:

Create a file /etc/dhcp3/dhclient-enter-hooks, and add the following content:

make_resolv_conf() {
          echo "do nothing with resolv.conf"
}

 

then edit your /etc/resolv.conf to the content of your heart, then restart your network.