Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why is my resolv.conf overwritten any now and then?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
muebi
Guru
Guru


Joined: 07 Nov 2008
Posts: 312

PostPosted: Tue Nov 17, 2009 9:35 pm    Post subject: Why is my resolv.conf overwritten any now and then? Reply with quote

Hi,

I have the strange problem that my resolv.conf file gets overwritten every couple of hours or so and I have to manually create it then. Otherwise I cannot browse the web anymore e.g. with firefox.
Can anybody help me to fix this problem please?
Back to top
View user's profile Send private message
ikshaar
Veteran
Veteran


Joined: 23 Jul 2002
Posts: 1339
Location: Baltimore, MD

PostPosted: Tue Nov 17, 2009 9:44 pm    Post subject: Reply with quote

resolv.conf is automatically generated. Was changed a while ago. Now top line of resolv.conf mentions

Quote:
# Generated by resolvconf


your config should now be set in /etc/conf.d/net instead

Code:
dns_servers_eth0="192.168.0.1"

_________________
"May God stands between you and harm in all the empty places where you must walk" - Babylon 5
Back to top
View user's profile Send private message
salmonix
Guru
Guru


Joined: 16 Jul 2006
Posts: 410

PostPosted: Thu Nov 19, 2009 3:05 pm    Post subject: Reply with quote

Spposed to be true, but I am having the same problem.
If I have this setting:

Quote:
dns_domain_eth0="salmonix.thruhere.net"
mac_eth5="xx:xx:xx:xx:xx"
dhcp_eth0=("nodns")
dns_servers_eth0="208.67.222.222"
config_eth5=("dhcp -N") /or simply "dhcp"/


resolv.conf is overwritten.
eth5 is looking out, gets IP from the ISP.
_________________
Quis custodiet ipsos, custodes?
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2573
Location: Near Toronto

PostPosted: Thu Nov 19, 2009 4:13 pm    Post subject: Reply with quote

try adding this to /etc/conf.d/net

dhcp_ethX=( "nodns" )

where X is the proper interface number

(and make sure you have the right servers in resolv.conf :) )
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
salmonix
Guru
Guru


Joined: 16 Jul 2006
Posts: 410

PostPosted: Thu Nov 19, 2009 5:08 pm    Post subject: Reply with quote

I have it in net file, but the problem is the same.
_________________
Quis custodiet ipsos, custodes?
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2573
Location: Near Toronto

PostPosted: Thu Nov 19, 2009 5:52 pm    Post subject: Reply with quote

sorry I didn't pay enough attention; but is it possible
that the eth5 is causing the problem - what if
you set eth5 to nodns?
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
salmonix
Guru
Guru


Joined: 16 Jul 2006
Posts: 410

PostPosted: Thu Nov 19, 2009 6:10 pm    Post subject: Reply with quote

Thanx. Must be some degenerating effect on my brain capacity.
Age or aliens.
_________________
Quis custodiet ipsos, custodes?
Back to top
View user's profile Send private message
mwhite
n00b
n00b


Joined: 26 Jan 2008
Posts: 10

PostPosted: Thu Mar 04, 2010 10:54 pm    Post subject: Reply with quote

I tried the dhcp_eth0=("nodns") statement in /etc/conf.d/net but resolv.conf still gets written over every time I boot. BTW, AFAIK, a dhcp client isn't even running on this machine. there's no DHCP listed when I run rc-update -s and there no /etc/dhcp.conf file. This is a new server built with r10. My older gentoo servers don't have this problem at all. Any ideas? thanks.
Back to top
View user's profile Send private message
mwhite
n00b
n00b


Joined: 26 Jan 2008
Posts: 10

PostPosted: Fri Mar 05, 2010 5:27 pm    Post subject: Reply with quote

ikshaar wrote:
resolv.conf is automatically generated. Was changed a while ago. Now top line of resolv.conf mentions

Quote:
# Generated by resolvconf


your config should now be set in /etc/conf.d/net instead

Code:
dns_servers_eth0="192.168.0.1"



This is the fix. Thanks Ikshaar. Too bad resolv.conf doesn't mention the net files needs to be used instead.
Back to top
View user's profile Send private message
eugen_mihailescu
n00b
n00b


Joined: 27 Sep 2011
Posts: 23

PostPosted: Mon Oct 07, 2013 9:21 pm    Post subject: Reply with quote

salmonix wrote:
I have it in net file, but the problem is the same.

Is it possible that you have some definition not only in /etc/conf.d/net but also in /etc/conf.d/network and/or /etc/resolv.conf.head ?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14724

PostPosted: Mon Oct 07, 2013 9:35 pm    Post subject: Reply with quote

eugen_mihailescu wrote:
salmonix wrote:
I have it in net file, but the problem is the same.

Is it possible that you have some definition not only in /etc/conf.d/net but also in /etc/conf.d/network and/or /etc/resolv.conf.head ?
The poster you quoted already resolved his issue. Further, prior to your post, the most recent post in this thread was made almost a year before you even joined the Gentoo forums, and more than three years before your post.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum