Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-10-2008, 05:58 AM   #1
Registered: Apr 2008
Distribution: Fedora 9, Ubuntu 8.04, Ubuntu 8.04 Server
Posts: 103

Rep: Reputation: 15
How can I avoid network manager from modifying resolv.conf?

I want to keep opendns servers in my nameserver list, and I want to know how I can avoid network manager from modifying my resolv.conf after each time it connects to a different network. system-config-network doesn't work since it seems like network manager sets its own policies.

Can anyone advise? I'm on fedora 8.

Last edited by algogeek; 05-10-2008 at 06:32 AM.
Old 05-10-2008, 07:01 PM   #2
LQ Addict
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,283

Rep: Reputation: Disabled
until you get a better answer use a work around.

create a text file with your correct nameserver details and call it

2) create a script inside rc.local that replaces resolve.conf with resolve-new with a name change of course.

something like

mv -f /etc/resolve-new /etc/resolve.conf && chmod 600 /etc/resolve.conf
Old 05-12-2008, 02:28 AM   #3
Registered: Mar 2005
Location: india
Distribution: FC4, Debian Etch
Posts: 67

Rep: Reputation: Disabled
1. Create the file /etc/dhclient-enter-hooks that contains the following function

make_resolv_conf() {
echo "Do nothing"

2. chmod 644 /etc/dhclient-enter-hooks


fedora, manager, network, resolvconf, wireless

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the use of network-script, resolv.conf, network nawuza Linux - Software 3 01-06-2007 08:23 AM
how to avoid resolv.conf been modified by dhcp-client septanla Linux - Networking 3 03-18-2006 05:25 PM
how to avoid resolv.conf been modified by dhcp-client septanla Linux - Networking 1 03-07-2006 07:40 AM
resolv.conf changing everytime network restart cuco76 Linux - Networking 4 11-29-2004 08:19 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration