Download your favorite Linux distribution at LQ ISO.
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, 06: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 07:32 AM.
Old 05-10-2008, 08:01 PM   #2
LQ Guru
Registered: Oct 2003
Posts: 5,066

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, 03:28 AM   #3
Registered: Mar 2005
Location: india
Distribution: FC4, Debian Etch
Posts: 67

Rep: Reputation: 15
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 09:23 AM
how to avoid resolv.conf been modified by dhcp-client septanla Linux - Networking 3 03-18-2006 06:25 PM
how to avoid resolv.conf been modified by dhcp-client septanla Linux - Networking 1 03-07-2006 08:40 AM
resolv.conf changing everytime network restart cuco76 Linux - Networking 4 11-29-2004 09:19 PM

All times are GMT -5. The time now is 02:12 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