Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2001 18:28:47 -0600
From:      Jon Hamilton <hamilton@pobox.com>
To:        Steve Price <sprice@hiwaay.net>
Cc:        Dennis Jun <dennisjun@home.com>, freebsd-questions@FreeBSD.ORG, chat@gtabug.org
Subject:   Re: DNS caching, DHCP, /etc/resolv.conf 
Message-ID:  <20010115002847.87D6C177@woodstock.monkey.net>
In-Reply-To: Your message of "Sun, 14 Jan 2001 17:53:37 CST." <20010114175337.E65118@bonsai.knology.net> 

next in thread | previous in thread | raw e-mail | index | archive | help

In message <20010114175337.E65118@bonsai.knology.net>, Steve Price wrote:
} On Sun, Jan 14, 2001 at 06:41:22PM -0500, Dennis Jun wrote:
} # Hello all!
} # 
} # I recently setup a DNS caching server with named. I followed the
} # instructions in Lehey's "The Complete FreeBSD." However I'm on @home and I
} # my ip settings via dhcp. Thus it resets my /etc/resolv.conf all the time,
} # that is, it removes my first line of nameserver 127.0.0.1   I'm wondering
} # how can prevert/remedy this? I guess most people would suggest a simple
} # script cronned, but is there another solution?
} 
} The following manpage should have all the info you need.  Essentially
} you'll have to teach this script to add 127.0.0.1 back to resolv.conf
} when your box renegotiates its IP address.
} 
}         man 8 dhclient-script

That's doing it the hard way.  

Put something similar to the following in /etc/dhclient.conf (adjust the 
interface name to whatever is appropriate for your system):

       interface "dc0" {
           prepend domain-name-servers 127.0.0.1;
       }

You can prepend some stuff to the domain name search order (and lots of
other stuff, if you need to); see the man page for dhclient.conf for 
details.

-- 
   Jon Hamilton  
   hamilton@pobox.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010115002847.87D6C177>