Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
resolv.conf overwriting
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
nusch
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2007
Posts: 115
Location: Katowice(Poland)

PostPosted: Mon Oct 29, 2007 1:42 pm    Post subject: resolv.conf overwriting Reply with quote

I have problem with net scripts. I'm connected to to wireless networks through 2 interfaces - wlan0 - source of internet, open network , obtaining IP by dhcp. And eth1 - connected to home wireless gateway, with WPA via wpa_supplicant, at the moment it isn't connected to Internet, but I need it to connect other boxes.

Problem is that eth1 is overwriting dns'es in resolv.conf and ocassionally default gw. I'm running once it happen cat /etc/resolv.bak > /etc/resolv.conf but don't like such workaround.

I changed IP to static for home network but it still happens once a few minutes:
Code:

nusch@nuschbox ~ $ cat /etc/resolv.conf
# Generated by net-scripts for interface eth1
domain nuschNET


:roll:
Here is my conf.d/net:

Code:

...
modules_eth1=( "wpa_supplicant" )
modules_WantToChallenge=( "wpa_supplicant" )
modules_eduroam=( "wpa_supplicant" )
wpa_supplicant_eth1="-Dwext"
config_eduroam=( "dhcp") #used with eth1
config_Security_Lounge=( "192.168.10.3/24") #used with eth1
dhcp_Security_Lounge=( "-R" )
config_WantToChallenge=( "dhcp" ) # used with eth1
config_wlan0=( "dhcp" )
...
essid_wlan0="ISP"
mode_wlan0="managed"
iwconfig_wlan0="rate 1M"
...


If it's possible would like to obtain IP through DHCP but ignore gateway and dns's from it.
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Mon Oct 29, 2007 2:05 pm    Post subject: Reply with quote

Does
Code:

dhcp_eth1="nodns"

solve your problem?
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
nusch
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2007
Posts: 115
Location: Katowice(Poland)

PostPosted: Mon Oct 29, 2007 3:02 pm    Post subject: Reply with quote

Still happens, also tried:
Code:

metric_wlan0=10
metric_Security_Lounge=20
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Mon Oct 29, 2007 5:38 pm    Post subject: Reply with quote

Does
Code:

dhcp_eth1=( "-R" )

help? I don't get the "Security_Lounge" stuff in your config. Whats about this?
Btw can you please try to manually retrive an address for both interfaces using
Code:

dhcpcd wlan0
dhcpcd -R eth1

"-R" prevents dhcp to overwrite the resolv.conf. You maybe have to kill the dhcpcd
beforehand...
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
nusch
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2007
Posts: 115
Location: Katowice(Poland)

PostPosted: Mon Oct 29, 2007 6:49 pm    Post subject: Reply with quote

Sleipnir wrote:
Does
Code:

dhcp_eth1=( "-R" )

help? I don't get the "Security_Lounge" stuff in your config.

It's ESSID, I'm using laptop in different places and want to disable dhcp only for this specified one.

Quote:

Btw can you please try to manually retrive an address for both interfaces using
Code:

dhcpcd wlan0
dhcpcd -R eth1


I can also do
Code:

rc-update del net.wlan0
rc-update del net.eth1
iwconfig wlan0 essid ISP
iwconfig wlan0 rate 1M mode managed
wpa_supplicant foobar foobar foobar eth1
dhcpcd -d wlan0

But gentoo is not slackware and I want to use bulit-in scripts for this ;)
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Mon Oct 29, 2007 7:36 pm    Post subject: Reply with quote

Sometimes its nice to try a certain idea on commandline before trying to fiddle
around with the config stuff... ;-)
_________________
A)bort, R)etry, I)nfluence with large hammer.
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