I want to try out Google public DNS. For this I need to change the nameserver address. I know it's in the file /etc/resolv.conf, but whenever I start network-manager, it overwrites the values in that file with what it obtains by using DHCP.How do I tell it not to do it? I looked through the GUI, but I could only find an option to add more IP addresses.Below is the trophy :)
How to set DNS resolver in Fedora using network-manager?
linux;fedora;dns;networkmanager
Method #1Find the NetworkManager configuration file and add/modify the following entry (in CentOS5 it is in /etc/NetworkManager/nm-system-settings.conf or /etc/NetworkManager/system-connections/) and edit your DSL connection file :[ipv4]method=autodns=8.8.8.8;4.2.2.2;ignore-auto-dns=trueNote:- if [ipv4] does not work then try with [ppp]Method #2You can change permission of /etc/resolv.conf so that it can't be written by other services or you can use chattr.Method #3Create a script as mentioned below in /etc/Networkmanager/dispatcher.d/ and don't forget to make it executable:#!/bin/bash## Override /etc/resolv.conf and tell# NetworkManagerDispatcher to go pluck itself.## scripts in the /etc/NetworkManager/dispatcher.d/ directory# are called alphabetically and are passed two parameters:# $1 is the interface name, and $2 is up or down as the# case may be.# Here, no matter what interface or state, override the# created resolver config with my config.cp -f /etc/resolv.conf.myDNSoverride /etc/resolv.confentry of /etc/resolv.conf.myDNSoverridenameserver 8.8.8.8