View previous topic :: View next topic |
Author |
Message |
haneulso Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 31 Aug 2004 Posts: 173
|
Posted: Fri Aug 28, 2009 1:12 am Post subject: Networkmanager and resolv.conf |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
ltboy Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/20570483134775929436a9c.jpg)
Joined: 26 Oct 2004 Posts: 197 Location: Utah
|
Posted: Fri Aug 28, 2009 3:21 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Jaglover Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/179708169458f2999e44e26.gif)
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Fri Aug 28, 2009 3:44 am Post subject: |
|
|
Is it a laptop and you have to connect it in different places and different ways? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
haneulso Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 31 Aug 2004 Posts: 173
|
Posted: Fri Aug 28, 2009 5:07 am Post subject: it's a laptop |
|
|
It's a laptop.
And I have to connect to network at different places and different setting. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
john.peterson1982 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Sep 2009 Posts: 2
|
Posted: Tue Sep 01, 2009 11:16 am Post subject: Networkmanager and resolv.conf |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Sep 01, 2009 1:23 pm Post subject: Re: Networkmanager and resolv.conf |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Dagger Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/28177677446e8e74b25aff.jpg)
Joined: 11 Jun 2003 Posts: 765 Location: UK
|
Posted: Thu Sep 03, 2009 3:51 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|