Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Networkmanager and resolv.conf
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
haneulso
Apprentice
Apprentice


Joined: 31 Aug 2004
Posts: 173

PostPosted: Fri Aug 28, 2009 1:12 am    Post subject: Networkmanager and resolv.conf Reply with quote

I have to write down dns in /etc/resolv.conf.
But, I have a problem with NetworkManager, becouse every time it overwrites resolv.conf without dns.
How can I fix it?
Back to top
View user's profile Send private message
ltboy
Apprentice
Apprentice


Joined: 26 Oct 2004
Posts: 197
Location: Utah

PostPosted: Fri Aug 28, 2009 3:21 am    Post subject: Reply with quote

Pretty much everything network related overwrites resolv.conf. only way to make it stay is to enable the extended attributes for your filesystem and set the file as static, but that's just hackish and not really a solution.
probably best way would be to use your NetworkManager client to set the DNS values on a per network basis. After that just ignore resolv.conf.
_________________
Mmmm.... Brains!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Aug 28, 2009 3:44 am    Post subject: Reply with quote

Is it a laptop and you have to connect it in different places and different ways?
Back to top
View user's profile Send private message
haneulso
Apprentice
Apprentice


Joined: 31 Aug 2004
Posts: 173

PostPosted: Fri Aug 28, 2009 5:07 am    Post subject: it's a laptop Reply with quote

It's a laptop.
And I have to connect to network at different places and different setting.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Aug 31, 2009 10:43 pm    Post subject: Reply with quote

Current NetworkManager should support resolvconf, so emerge openresolv :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
john.peterson1982
n00b
n00b


Joined: 01 Sep 2009
Posts: 2

PostPosted: Tue Sep 01, 2009 11:16 am    Post subject: Networkmanager and resolv.conf Reply with quote

DHCP overwrites resolv.conf. Use /etc/dhcp3/dhclient.conf to list "permanent" DNS nameservers. For example, the prepend command will put your nameservers ahead of any obtained through DHCP. The append command will put them after any obtained through DHCP.

For example:

prepend nameservers x.x.x.x, y.y.y.y, z.z.z.z;


__________________________________________________________________________________

Regards..

John

--------------------------------------------------------------------------------------------------------------------

aion gold | certified organic skin care | auburn dwi lawyer | cheapest wow gold


Last edited by john.peterson1982 on Mon Sep 14, 2009 7:23 am; edited 1 time in total
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Sep 01, 2009 1:23 pm    Post subject: Re: Networkmanager and resolv.conf Reply with quote

john.peterson1982 wrote:
DHCP overwrites resolv.conf. Use /etc/dhcp3/dhclient.conf to list "permanent" DNS nameservers. For example, the prepend command will put your nameservers ahead of any obtained through DHCP. The append command will put them after any obtained through DHCP.

For example:

prepend nameservers x.x.x.x, y.y.y.y, z.z.z.z;


That won't work as NetworkManager supplies dhclient it's own automatically generated config.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Dagger
Retired Dev
Retired Dev


Joined: 11 Jun 2003
Posts: 765
Location: UK

PostPosted: Thu Sep 03, 2009 3:51 pm    Post subject: Reply with quote

You can add your own DNS settings in nm-applet (gnome) and networkmanager-applet (kde - currently still only in kde-testing) clients on per-connection basic.

As Uberlord suggested - openresolv can solve all your DNS problems. Just reinstall NetworkManager with resolvconf use flag.
_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
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