Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
resolv.conf link disappearing
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
sawyert
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 156
Location: Leeds, UK

PostPosted: Fri Jan 23, 2004 10:12 pm    Post subject: resolv.conf link disappearing Reply with quote

Something is clobbering my resolv.conf link. I use pptp to connect to the vpn at work, so I normally have resolv.conf as a link pointing to resolv.conf.real, which then points to resolv.conf.pptp when I'm on the vpn.

However, something keeps removing the resolv.conf link and replacing it with a file again. Does anyone have any idea what this something could be?

Cheers,

Tim.
Back to top
View user's profile Send private message
hadfield
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 308
Location: Vancouver, BC, Canada

PostPosted: Fri Jan 23, 2004 10:39 pm    Post subject: Reply with quote

I believe that if you use DHCP it will overwrite the file, perhaps that's what's happenning. Try using hard links and see if that does anything.
Back to top
View user's profile Send private message
sawyert
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 156
Location: Leeds, UK

PostPosted: Fri Jan 23, 2004 11:01 pm    Post subject: Reply with quote

Good idea, but the hard link is just clobbered by a soft one as soon as I connect to the vpn.

I'm not using DHCP, but a static ip.

Tim.
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Fri Jan 23, 2004 11:09 pm    Post subject: Reply with quote

You probably need to to specify to your PPP/PPPOE software that it it should not use the DNS server information offered by the ISP. For Roaring Penguin this is in /etc/ppp/pppoe.conf, the PEERDNS settitng. For the net.ppp0 script this setting is in /etc/conf.d/net.ppp0.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
sawyert
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 156
Location: Leeds, UK

PostPosted: Sat Jan 24, 2004 11:31 am    Post subject: Reply with quote

DNS works fine, it's just I'm losing my link.

It seems to happen at bootup. I had a resolv.conf link last night, and now I've rebooted I have a file again, which doesn't match resolv.conf.real or resolv.conf.pptp, so where'd it come from?

Any ideas gratefully received...

Tim.
Back to top
View user's profile Send private message
Chris W
l33t
l33t


Joined: 25 Jun 2002
Posts: 972
Location: Brisbane, Australia

PostPosted: Sat Jan 24, 2004 11:43 am    Post subject: Reply with quote

The link is disappearing because the PPP daemon is overwriting it with details provided by your ISP. Before it overwrites the file it makes a copy, which it restores on exit. Your link is now a real file.

Get the link straight then connect to your ISP but don't start the VPN. Look at the/etc/resolv.conf and I think you'll find it is a real file.
_________________
Cheers,
Chris W
"Common sense: The collection of prejudices acquired by age 18." -- Einstein
Back to top
View user's profile Send private message
sawyert
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 156
Location: Leeds, UK

PostPosted: Sat Jan 24, 2004 12:19 pm    Post subject: Reply with quote

I don't think I'm using ppp to connect to the internet, only to the VPN. I use an ADSL router and connect to it through my LAN.

I've looked at /etc/conf.d/net.ppp0 and I think these are the relevant bits: Not sure about the default route line

DEFROUTE="yes" # Must pppd set the default route?
PEERDNS="no" # Should pppd set the peer dns?

I'd appreciate any thoughts...

Tim.
Back to top
View user's profile Send private message
buzzin
Apprentice
Apprentice


Joined: 17 Oct 2003
Posts: 264
Location: St. Albans, UK.

PostPosted: Sat Jan 24, 2004 12:19 pm    Post subject: Reply with quote

When i had this problem, just changing the attr of resolv.conf worked fine.

Just do below and no program will be able to modify or remove that file;

Quote:

chattr +i /etc/resolv.conf


Hope it helps,

- LSD
Back to top
View user's profile Send private message
sawyert
Apprentice
Apprentice


Joined: 21 Aug 2003
Posts: 156
Location: Leeds, UK

PostPosted: Sun Jan 25, 2004 3:29 pm    Post subject: Reply with quote

I don't think that will work for me because my disk is reiserfs not ext3. Also, the pptp code needs to be able to change the link from normal to VPN when I connect.

Thanks for the idea though

Tim.
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