APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Prevent overwrite of resolv.conf with dynamic ip


From: George Ruch <george.ruch@3lefties.com>
Subject: Re: Editing resolv.conf - knoppix
Date: Sat, 06 Aug 2005 17:17:06 -0600
Message-ID: <segaf1dpaaoif9cfar4cb5tqqitlb45qhc@4ax.com> 
References: <3ljrkaF12h74eU1@individual.net>
<v11fs2-qmr.ln1@news.heiming.de> Michael Heiming <michael+USENET@www.heiming.de> wrote: >In comp.os.linux.misc Gordon <gbplinux@gmail.com.invalid>: >> The router I use to access the internet is supplied by my wife's company, >> preconfigured for DHCP and is unnaccessible to edit. >> As the router is set up to act as a DHCP server, resolv.conf is overwritten >> on each boot if it it manually edited. (Apt-get won't work unless my ISP >> namserver is added to resolv.conf) >> In Ubuntu, I was able to edit a file (dhcclient.conf?) which automatically >> added my ISP's nameserver to resolv.conf. >> I am assuming in Knoppix that the file to edit is dhcpd.conf, but for the > >Not really, "/etc/dhcpd.conf" is the dhcp server config file. >Dunno about Ubuntu, rh and alike use >/etc/sysconfig/network-scripts/ifcfg-eth<n> putting in >"PEERDNS=no" or so should do the trick, check the Ubuntu docu >about network configuration. I've just finished setting up Debian Sarge on my little machine, and ran into the same problem. I couldn't find the RH file referenced above, bit I did find this solution. What does work is to create a file names /etc/dhclient-enter-hooks containing make_resolv_config() { echo "leave pre-defined resolv.conf alone" } make it executable with chmod 0755 /etc/dhclient-enter-hooks then edit your resolv.conf as needed. I forget where I found this fix (try googling "dhclient overwrites resolv.conf"), but I found the details on how dhclient-script works are at http://linux.about.com/library/cmd/blcmdl8_dhclient-script.htm. | George Ruch | "Is there life in Clovis after Clovis Man?"

Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> prevent overwrite of resolv.conf with dynamic ip



Increase ad revenue 50-250% with Ezoic

Kerio Samepage


Have you tried Searching this site?

Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





Software and cathedrals are much the same – first we build them, then we pray. (Sam Redwine)





This post tagged: