Wednesday, August 6, 2008

Re: [BLUG] On modifying /etc/resolv.conf (was: Re:IU VPN connection on Linux)

On Wed, Aug 06, 2008 at 12:52:10AM -0400, initech wrote:
> [...] (it only took a
> little additional twiddling with /etc/resolv.conf). [...]

For those familiar with older manually configured /etc/resolv.conf
files, you may be in for a shock if on an dist. upgrade or simple
package install you suddenly get 'resolvconf' installed. 'resolvconf'[1]
allows programs which dynamically modify /etc/resolv.conf to do this in
a more sane manner.

The problem, however, is that 'resolvconf' over-writes /etc/resolv.conf
once it starts, and if that's the canonical location of your DNS
information, you can suddenly find yourself without valid DNS access.

I've had this happen simply due to installing packages which
recommend/depend upon it. This caused it to get installed, and that
caused my DNS information to be lost. (In Ubuntu it is in 'universe'[2]
at this point. That may not always be the case, though.)

For static DNS information, instead of putting it in /etc/resolv.conf,
you'll want to start putting it in /etc/interfaces/network. (If only to
back up the information, now that you know resolv.conf may be lost.)
There are new options associated with 'iface's which allow these to be
set there ("dns-nameservers" and "dns-search").

[1] http://en.wikipedia.org/wiki/Resolvconf
[2] http://packages.ubuntu.com/hardy/resolvconf

Cheers,

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

No comments: