Resolv.conf

From Noah.org
Revision as of 17:44, 14 December 2006 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


You may find that changes to resolv.conf disappear from time-to-time on Ubuntu. This is because you are not supposed to manually edit the resolv.conf file anymore. Various network pre-up and pre-down scripts can cause resolv.conf to be overwritten.

If you are running DHCP client

If you are running DHCP client then you can put static nameserver in either /etc/dhcp3/dhclient.conf or /etc/resolvconf/resolv.conf.d/base (follow the static address instructions below).

If you are using Static IP

If you have a static address and your resolv.conf is lost on reboot then you need to create a file:

   /etc/resolvconf/resolv.conf.d/base

Add the nameserver lines that you want to always be included in your resolv.conf file. Then after no matter what service causes resolv.conf to be regenerated you can be sure it will contain these nameserver lines. For example, you might put the following in "base" to use OpenDNS:

   nameserver 208.67.222.222
   nameserver 208.67.220.220

Do a man on "resolvconf". This is not the same man page as "resolv.conf".