Bug 182011 - [enh] Allow custom DNS servers and search domains
[enh] Allow custom DNS servers and search domains
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dan Williams
: FutureFeature
: 177307 426097 (view as bug list)
Depends On:
Blocks: NMF9Blockers
  Show dependency treegraph
Reported: 2006-02-18 19:21 EST by Todd Gee
Modified: 2008-04-10 16:02 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-10 16:02:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Todd Gee 2006-02-18 19:21:45 EST
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-18 19:23:02 EST
See also bug 165711 -- another resolve.conf issue related to NetworkManager
Comment 2 Todd Gee 2006-02-20 13:51:21 EST
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 02:21:51 EST
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 00:11:01 EST
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 18:39:33 EST
oops, I think I accidently changed the enhancement flag...  changing back.
Comment 6 Christopher Aillon 2006-03-02 19:10:41 EST
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 00:51:46 EST
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 05:04:40 EST
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 18:23:06 EDT
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 16:33:36 EST
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 10:20:46 EST
*** Bug 426097 has been marked as a duplicate of this bug. ***
Comment 12 Denis Leroy 2007-12-18 10:21:41 EST
*** Bug 177307 has been marked as a duplicate of this bug. ***
Comment 13 Denis Leroy 2007-12-18 11:24:49 EST
*** Bug 426097 has been marked as a duplicate of this bug. ***
Comment 14 Dan Williams 2008-04-10 16:02:21 EDT
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.