View previous topic :: View next topic |
Author |
Message |
sawyert Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 21 Aug 2003 Posts: 156 Location: Leeds, UK
|
Posted: Fri Jan 23, 2004 10:12 pm Post subject: resolv.conf link disappearing |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
hadfield Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/gallery/Zelda/Zelda_-_Link.jpg)
Joined: 18 Mar 2003 Posts: 308 Location: Vancouver, BC, Canada
|
Posted: Fri Jan 23, 2004 10:39 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
sawyert Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 21 Aug 2003 Posts: 156 Location: Leeds, UK
|
Posted: Fri Jan 23, 2004 11:01 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Chris W l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Simpsons/Simpsons_-_Ralph.jpg)
Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Fri Jan 23, 2004 11:09 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
sawyert Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 21 Aug 2003 Posts: 156 Location: Leeds, UK
|
Posted: Sat Jan 24, 2004 11:31 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Chris W l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Simpsons/Simpsons_-_Ralph.jpg)
Joined: 25 Jun 2002 Posts: 972 Location: Brisbane, Australia
|
Posted: Sat Jan 24, 2004 11:43 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
sawyert Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 21 Aug 2003 Posts: 156 Location: Leeds, UK
|
Posted: Sat Jan 24, 2004 12:19 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
buzzin Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/175924690240210c7fb973b.jpg)
Joined: 17 Oct 2003 Posts: 264 Location: St. Albans, UK.
|
Posted: Sat Jan 24, 2004 12:19 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
sawyert Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 21 Aug 2003 Posts: 156 Location: Leeds, UK
|
Posted: Sun Jan 25, 2004 3:29 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|