My short term goal is to set up resolv.conf the way I want without disabling network manager. I set up a config file for dhclient, but it turns out that NetworkManager runs dhclient with the configfile set to one it generates insteqad of the normal one used by dhclient. For the first wireless interface the file is named /var/run/nm-dhclient-wlan0.conf .
Is there a way to control what is in that file using NetworkManager configuration?
On Tuesday 31 July 2012 17:52:45 Bruno Wolff III wrote:
My short term goal is to set up resolv.conf the way I want without disabling network manager. I set up a config file for dhclient, but it turns out that NetworkManager runs dhclient with the configfile set to one it generates insteqad of the normal one used by dhclient. For the first wireless interface the file is named /var/run/nm-dhclient-wlan0.conf .
Is there a way to control what is in that file using NetworkManager configuration?
It's really difficult to get rid of NetworkManager in Fedora, I've tried.
So here's a solution:
Set up /etc/resolv.conf just as you want. Then
chattr +1 /etc/resolv.conf
This prevents NetworkManager from messing with it ever again.
Tony
On Tue, Jul 31, 2012 at 12:30 PM, Tony Molloy tony.molloy@ul.ie wrote:
So here's a solution:
Set up /etc/resolv.conf just as you want. Then
chattr +1 /etc/resolv.conf
Shouldn't this be "i" (immutable) instead of "1"? I didn't see an attribute like that in the man page.
Interesting though... I've been running linux exclusively for several years now but never used or needed that tool.
Richard
On Tuesday 31 July 2012 18:41:51 Richard Shaw wrote:
On Tue, Jul 31, 2012 at 12:30 PM, Tony Molloy tony.molloy@ul.ie
wrote:
So here's a solution:
Set up /etc/resolv.conf just as you want. Then
chattr +1 /etc/resolv.conf
Shouldn't this be "i" (immutable) instead of "1"? I didn't see an attribute like that in the man page.
Oops typo on my part!!!
Interesting though... I've been running linux exclusively for several years now but never used or needed that tool.
Only time I've ever had to use it myself. I need to use my university's DNS rather than the one my ISP gives me.
Tony
Richard
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/31/2012 11:52 AM, Bruno Wolff III wrote:
My short term goal is to set up resolv.conf the way I want without disabling network manager. I set up a config file for dhclient, but it turns out that
NetworkManager runs dhclient with the configfile set to one it generates insteqad of the normal one used by dhclient. For the first wireless interface the file is named /var/run/nm-dhclient-wlan0.conf .
Is there a way to control what is in that file using
NetworkManager configuration? Under the IPv4 settings, pick Automatic (DHCP) address only.
Mikkel - -- Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
On Tue, Jul 31, 2012 at 18:30:22 +0100, Tony Molloy tony.molloy@ul.ie wrote:
So here's a solution:
Set up /etc/resolv.conf just as you want. Then
chattr +1 /etc/resolv.conf
I knew about that as one possible hammer. I was hoping to find something that worked more with NM than against it.
On Tue, Jul 31, 2012 at 14:23:38 -0500, "Mikkel L. Ellertson" mellertson@gmail.com wrote:
On 07/31/2012 11:52 AM, Bruno Wolff III wrote:
Is there a way to control what is in that file using
NetworkManager configuration? Under the IPv4 settings, pick Automatic (DHCP) address only.
That looks like what I want. I'll need to see if it is per interface (which would be better) or per connection.
Thanks.
On Tue, Jul 31, 2012 at 14:59:41 -0500,
That looks like what I want. I'll need to see if it is per interface (which would be better) or per connection.
It turns out that solution is per connection/AP, not per interface. It also doesn't let me do some things.
However, I found ifIput the config I want in /etc/dhcp/dhclient-wlan0.conf, the config does get used by MetworkManager for any connection on that wireless device. I can point to a local dns caching resolver and set a domian search path that is useful for me.
This wasn't documented any place that looked official that I could find, but Iran across the file name in a post while searching and gave it a try.