Bug 182011 - [enh] Allow custom DNS servers and search domains
Summary: [enh] Allow custom DNS servers and search domains
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 7
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Dan Williams
QA Contact:
: 177307 426097 (view as bug list)
Depends On:
Blocks: NMF9Blockers
TreeView+ depends on / blocked
Reported: 2006-02-19 00:21 UTC by Todd Gee
Modified: 2008-04-10 20:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2008-04-10 20:02:21 UTC

Attachments (Terms of Use)

Description Todd Gee 2006-02-19 00:21:45 UTC
Description of problem:

I am using NetworkManager-0.5.1-1.FC4.4 and have both interfaces configured to
not update my resolve.conf file (since I'm running named).  This works fine if I
manually bring an interface up; but NetworkManager ignores this setting and
modifies my resolve.conf file anyway.

Version-Release number of selected component (if applicable):


How reproducible/Steps to Reproduce:

0. Set resolve.conf to use some known nameserver (modify from current value)
1. Using (fedora) system-config-network, update an interface profile to not
"Automatically obtain DNS information from provider". 
2. Save configuration.  
3. Allow NetworkManager to activate the selected interface.  
4. Observe that resolve.conf file has been modified.

Actual results:

resolve.conf modified

Expected results:

resolve.conf left in previous state.

Additional info:

Comment 1 Todd Gee 2006-02-19 00:23:02 UTC
See also bug 165711 -- another resolve.conf issue related to NetworkManager

Comment 2 Todd Gee 2006-02-20 18:51:21 UTC
see also bug 158495 -- but this one talks about lack of options other than DHCP
(which, I believe, is a known and understood limitation of NM at this time.)

Comment 3 Dan Williams 2006-02-27 07:21:51 UTC
Yes, NM takes over resolv.conf at this time.  While this may get fixed in the
future, it's more of an enhancement request.  Part of the problem here is that
when NM gets new DNS server information for, ie, your VPN connection, what
should it do with that?  If it can't touch /etc/resolv.conf, then you can't use
your VPN connection...

Anyway, is the issue that you'd like to use a specific set of DNS servers rather
than what DHCP provides?

Comment 4 Todd Gee 2006-02-28 05:11:01 UTC
well, in my particular case, I run my own name server as the one that DHCP gives
me access too doesn't work very well.  (and running my own name server is just
faster overall -- especially after the cache is built up...)

I could see a configuration dialog (that NM kinda' lacks at this point so there
wouldn't be a great place to put it) with an option "take DNS from DHCP".  This
could be toggled on/off as necessary.  Or, maybe it'd be appropiate to add this
to the dialog that is shown on "Connect to other wireless network".  

this should probably be an option for wired networks as well...

I can see the difficulty in managing this bit -- in some cases, it needs to be
set; but in others, it's not appropiate...  

Comment 5 Todd Gee 2006-03-02 23:39:33 UTC
oops, I think I accidently changed the enhancement flag...  changing back.

Comment 6 Christopher Aillon 2006-03-03 00:10:41 UTC
Not sure that this is the best solution, but you can probably use
NetworkManagerDispatcher to use your preferred nameserver.

Make sure the service is running, and add a shell script to your
/etc/NetworkManager.d directory (you might need to create it) which will get
called when your interface is brought up or down.

Comment 7 Todd Gee 2006-03-07 05:51:46 UTC
Just in case anyone reads this thread, the directory given in comment 6 is
(directly above) is incorrect (for the Fedora version anyway).  The correct
NetowkrManagerDispatcher scripts directory should be

I created a script that updates the resolve.conf file and placed it in this
directory and it worked like a champ -- thanks for the tip.

This enhancement should be addressed sometime -- just to add an additional
feature into the system...  Thanks all.

Comment 8 Christian Iseli 2007-01-22 10:04:40 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?


Comment 9 Todd Gee 2007-07-30 22:23:06 UTC
This is still the case in Fedora 7 (which I finally got around to installing).

There is no way in the current release to tell NetworkManager to use a preferred
name server, or to not use the DNS settings from the DHCP server reply.

Comment 10 Alberto Gonzalez 2007-11-14 21:33:36 UTC
I can confirm that this happens in Fedora 8 too. I configure my network with a
static IP and not via DHCP, yet Network Manager insists in overwriting my

I haven't seen this behaviour in other distributions (with Network Manager
enabled). Only Fedora. So I'm not sure it's only Network Manager to blame.

Comment 11 Denis Leroy 2007-12-18 15:20:46 UTC
*** Bug 426097 has been marked as a duplicate of this bug. ***

Comment 12 Denis Leroy 2007-12-18 15:21:41 UTC
*** Bug 177307 has been marked as a duplicate of this bug. ***

Comment 13 Denis Leroy 2007-12-18 16:24:49 UTC
*** Bug 426097 has been marked as a duplicate of this bug. ***

Comment 14 Dan Williams 2008-04-10 20:02:21 UTC
This should be fixed if using system connections in rawhide or latest
f8-updates-testing.  Putting SEARCHES and DNS1/DNS2/DNS3 into the ifcfg files
will make NM use those settings.

Note You need to log in before you can comment on or make changes to this bug.