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

Prevent overwrite of resolv.conf with dynamic ip


© August 2005 (various authors)
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 https://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


Inexpensive and informative Apple related e-books:

Take Control of the Mac Command Line with Terminal, Second Edition

Photos: A Take Control Crash Course

Take Control of Numbers

Take Control of Automating Your Mac

Take Control of Upgrading to El Capitan





Printer Friendly Version

Have you tried Searching this site?

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


Printer Friendly Version





Just because they've sold you an IP based phone system doesn't mean they know anything about IP, does it? (Tony Lawrence)




Linux posts

Troubleshooting posts


This post tagged:

Linux

Networking



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com