[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Keeping dhcp from overwriting /etc/resolve.conf
On Wed, 6 Mar 2002, Nick Holland wrote:
> Jeff Ross wrote:
> > Would
> > chmod 444 /etc/resolve.conf
> > do the trick? Or will that cause everything to come to a screeching halt
> > with an error?
> Tried that, didn't work.
> Got overwritten, anyway.
> > I'm running another make build on the only system available that gets a
> > dynamic address, or I'd try it....
> The /etc/resolv.conf.tail trick works, if all you need is a 'lookup
> file bind' on the end of your file.
> In my case, however, I wanted to NOT use my ISP's DNS servers, but
> rather, my own in-house DNS server, and specify my own domain name.
> What I did to achieve this is change two lines of
> /sbin/dhclient-script to rewrite /etc/resolv.conf.dhcp instead of
> /etc/resolv.conf. This way, I could see what my ISP was wanting to do
> to me (that is sometimes useful to know), and yet what *I* put in
> resolv.conf stayed.
I just add this to my /etc/dhclient.conf:
prepend domain-name-servers 188.8.131.52, 184.108.40.206, 10.0.9.250;
The DNS servers dhclient gets, are put behind these DNS servers.
You could use supersede instead of prepend.