Using OpenDNS Nameservers on Fedora 10

November 30th, 2008

I posted a very similar article using Fedora 9 but it seems that things have changed between Fedora 9 and 10.

The old instructions mentioned adding the DNS servers to your /etc/dhclient-eth0.conf file but this file does not even exist on Fedora 10. It turns out that you need to add the lines to /etc/sysconfig/networking/devices/ifcfg-eth0 (change eth0 to the connection you wish to edit) as shown here, my file now looks like this.

# Broadcom Corporation BCM4401 100Base-T
DEVICE=eth1
HWADDR=00:00:00:00:00:00
ONBOOT=no
BOOTPROTO=dhcp
USERCTL=no
PEERDNS=no
IPV6INIT=no
NM_CONTROLLED=yes
TYPE=Ethernet
# add these lines with your DNS servers
DNS1=208.67.222.222
DNS2=208.67.220.220

Rstart your networking to see the changes. If you’re using NetworkManager and right click on the applet to edit the connections you will see that the IPV4 tab now says ‘Automatic (DHCP) addresses only’ with the DNS servers listed in the box below.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

7 responses

  1. kingsley comments:

    This doesn’t work out for me. After I make the edits to the config file and restart my network, the changes don’t take effect. Could this be because my connection is wireless and uses wlan0?

  2. Bob Peers comments:

    Are you editing the correct file? If your connection is wlan0 you should edit the file /etc/sysconfig/networking/devices/ifcfg-wlan0, sorry if that wasn’t clear in the post.

  3. kingsley comments:

    I edited wlan0 too… no dice. Since I’m using wireless, I removed the TYPE=Ethernet line. Is there some other value I should put there? Thanks for your help.

  4. Bob Peers comments:

    Have you tried to make a new connection in NetworkManager after making this change, maybe that could work. Otherwise you could try making the file /etc/dhclient-wlan0.conf with the correct entries from my old Fedora 9 post and see if that works. I’ve read a few posts that NetworkManager still seems to look for that file.

  5. Jim Gribbin comments:

    Instead of putting that in /etc/sysconfig/networking/devices/ifcfg-eth0 and wlan0, I ended up having to put it in /etc/sysconfig/network-scripts/ifcfg-wlan0 & eth0. The ones in /etc/sysconfig/networking/devices/ did nothing for me.

    Running Fedora 10.

  6. Trung An comments:

    didn’t work for me :(

  7. Jin-Kang Cheng comments:

    i am using pppoe connection and it generating a ppp0 virtual device and there is no ifcfg-ppp0 on the /etc/sysconfig/networking/devices directory… so can i add the line on the /etc/sysconfig/network-script/ifcfg-ppp0 file or the /etc/resolv.conf file???

Leave a comment

Switch to our mobile site