LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Who changes /etc/resolv.conf? (http://www.linuxquestions.org/questions/debian-26/who-changes-etc-resolv-conf-379813/)

lmp 11-04-2005 12:46 AM

Who changes /etc/resolv.conf?
 
Hello, list
I have an adsl connection, started by pppd. I tell pppd to use my /etc/resolv.conf by commenting the line "usepeerdns". But after some time, resolv.conf gets changed. These are my configuration files:

### provider
# Minimalistic default options file for DSL/PPPoE connections
noipdefault
defaultroute
replacedefaultroute
hide-password
lcp-echo-interval 30
lcp-echo-failure 4
noauth
persist
# mtu 1492
# usepeerdns
plugin rp-pppoe.so eth0
user "my user"

### options
asyncmap 0
auth
crtscts
lock
hide-password
modem
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
noipx

Who keeps changing my /etc/resolv.conf? In case it matters, I'm using Debian Sarge.

Wells 11-04-2005 06:53 AM

Very likely in this case what is happening is that your system is doing a DHCP renew. When it does that, it runs the /etc/dhclient-script, which calls /sbin/resolvconf. This in turn queries the DHCP server of your ISP and rewrites resolv.conf.

anystupidassname 11-17-2005 11:09 AM

how might one rectify this?
 
is there a parameter you can pass to dhclient so that it doesn't rewrite resolv.conf?

ironwalker 11-17-2005 12:42 PM

Set up a static ip.

lmp 11-29-2005 08:08 AM

I think this is the easiest solution: make sure /etc/resolv.conf contains exactly what you need and then:

chattr +i /etc/resolv.conf

wil make it "immutable"


All times are GMT -5. The time now is 07:22 AM.