LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-04-2005, 12:46 AM   #1
lmp
LQ Newbie
 
Registered: Dec 2004
Distribution: CentOS 4
Posts: 7

Rep: Reputation: 0
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.
 
Old 11-04-2005, 06:53 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
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.
 
Old 11-17-2005, 11:09 AM   #3
anystupidassname
LQ Newbie
 
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
how might one rectify this?

is there a parameter you can pass to dhclient so that it doesn't rewrite resolv.conf?
 
Old 11-17-2005, 12:42 PM   #4
ironwalker
Member
 
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
Set up a static ip.
 
Old 11-29-2005, 08:08 AM   #5
lmp
LQ Newbie
 
Registered: Dec 2004
Distribution: CentOS 4
Posts: 7

Original Poster
Rep: Reputation: 0
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"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
resolv.conf albundy Linux - Software 5 12-14-2004 03:12 PM
resolv.conf jmdlcar Slackware 9 05-15-2004 11:44 AM
resolv.conf ricemark20 Linux - Networking 12 11-11-2003 04:08 PM
resolv.conf dnsbum Linux - Networking 1 10-21-2003 12:00 PM
resolv.conf Culbert Linux - Networking 8 03-20-2003 04:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration