LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-30-2009, 02:35 PM   #1
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Rep: Reputation: 30
Something is overwriting my /etc/resolv.con


Periodically I stop being able to browse the Internet because some application rewrites my /etc/resolv.comf.

Initially this was Networkmanager, but I've installed wicd which apparently removes networkmanager.

Any idea which program it is and how to stop it?
 
Old 10-30-2009, 03:37 PM   #2
tothzp
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Rep: Reputation: 17
Quote:
Originally Posted by cov View Post
Periodically I stop being able to browse the Internet because some application rewrites my /etc/resolv.comf.

Initially this was Networkmanager, but I've installed wicd which apparently removes networkmanager.

Any idea which program it is and how to stop it?
This typically happens if you run a DHCP client that periodically renews the DHCP lease and together with that it gets the search entries for your resolv.conf.
If so, you can configure the dhcp client to not request/ignore some data from the DHCP server.
 
Old 10-30-2009, 03:40 PM   #3
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Yes, that sounds likely.

I'll have to google a little, I guess...
 
Old 10-31-2009, 03:36 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
This is such a common requirement that there is actually a system call for doing it properly (which is to manage a stack of resolv.confs and not simply overwrite the current one)... As well as DHCP, PPP can do this.

Usually, if you look at the changed resolv.conf there is a comment included telling you which program required it to be done. Is that not true here?
 
Old 10-31-2009, 03:46 AM   #5
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by salasi View Post
This is such a common requirement that there is actually a system call for doing it properly (which is to manage a stack of resolv.confs and not simply overwrite the current one)... As well as DHCP, PPP can do this.

Usually, if you look at the changed resolv.conf there is a comment included telling you which program required it to be done. Is that not true here?
No, not currently.

When NetworkManager was installed it did indeed issue a comment acknowledging that the resolv.conf had been rewritten and claiming responsibility, but currently no app is owning up.

I've actually allocated myself a static IP now anyway, which solves the problem.
 
Old 02-20-2010, 03:23 PM   #6
tothzp
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Rep: Reputation: 17
Hi,

Look at the manpage of dhclient.conf, look for the supersede option modifier.
E.g. to keep your default search line, use option domain-search.

E.g.
Quote:
supersede domain-search "myserver1.com", "myserver2.com";

Last edited by tothzp; 02-20-2010 at 03:28 PM.
 
  


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
con not boot anurak Red Hat 1 07-04-2006 03:21 AM
Con Kolivas kernel Greebstreebling Debian 1 12-28-2005 08:18 AM
How to specify a default nameserver in /etc/resolv.con libregeek Linux - Networking 6 11-19-2005 11:41 AM
DHCP client overwriting resolv.conf... how to stop it? gauge73 Linux - Networking 6 05-04-2005 11:51 AM
con kolavius patchset Abe_the_Man Linux - General 5 03-18-2004 05:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:14 AM.

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