Home > Internet > How To Setup OpenDNS On Ubuntu

How To Setup OpenDNS On Ubuntu

I had heard about OpenDNS a while ago but for some reason never looked much into it. A magazine article tonight reminded me about OpenDNS so I thought I’d take a look. Well, I’m happy that I did so far. I thought I would outline a few steps for you to get OpenDNS setup on your machine.

First, what is OpenDNS?

OpenDNS is a better DNS, free to all. OpenDNS uses its distributed network of DNS servers to speed up your Internet experience, increase reliability, improve security and make DNS smarter for users all over the world.

Basically you can stop using your ISPs DNS, which can often be slower or unreliable, and use this instead. Here is how to set it up on an Ubuntu machine. You can see the Ubuntu setup instructions on the OpenDNS site if you’d like more information.

sudo cp /etc/resolv.conf /etc/resolv.conf.auto

sudo gedit /etc/dhcp3/dhclient.conf

Look for the below line, which will be commented, and match this setting.

# append the following line to the document
prepend domain-name-servers 208.67.222.222,208.67.220.220;

Once your entry matches this you will want to save the file and restart networking using a command such as the one below.

sudo ifdown eth0 && sudo ifup eth0

You can then visit this address to verify that you’re using the new OpenDNS service.

http://welcome.opendns.com

Categories: Internet Tags: ,
  1. March 14th, 2007 at 22:43 | #1

    Very Kewl! I dig your tutorials. Keep up the good work.
    Cheers,
    art.in.memphis

  2. March 15th, 2007 at 05:53 | #2

    I think that article is quite biased, e.g. “OpenDNS is a _better_ DNS”. Just because it has ‘open’ in it’s name doesn’t mean it’s always better. My ISP has an excellent and very reliable DNS-server with a ping roundtrip of a few milliseconds. I’d like to see OpenDNS beat that :)

  3. March 16th, 2007 at 14:30 | #3

    Another method for accomplishing this (provided you have resolvconf installed) is to add the following to /etc/resolvconf/resolv.conf.d/base.

    # OpenDNS nameservers (http://www.opendns.com/)
    nameserver 208.67.222.222
    nameserver 208.67.220.220

  4. Irritated
    March 17th, 2007 at 06:48 | #4

    This is a good tutorial about changing DNS servers. OpenDNS is good, but I dont think its that good. I live in the UK and have used several ISP’s. Most of them have poor DNS but I always end up using Pipex’s DNS servers, even though I’m no longer a customer. Infact, you can usually use any ISP’s DNS server!

    If you’re in the UK instead of OpenDNS, try Pipex:

    Primary 212.103.224.51
    Secondary 212.103.224.52

    http://www.pipex.net/support/wirelessbroadband/troubleshoot.php

    Also worth mentioning, on many routers you can telnet into them and change the default DNS address it connects too. This way every computer connected will use the new DNS.

  5. Steve K
    April 1st, 2008 at 19:18 | #5

    My ISP just started intercepting “mistyped” URLs for fun and profit, so I just switched over to OpenDNS. So far it’s all good.

    :o )

  6. April 1st, 2008 at 21:22 | #6

    @Steve K – you should know that OpenDNS will do something similar, although I don’t think I’ve ever seen it in day-to-day use.

  7. September 26th, 2008 at 15:28 | #7

    Thanks for the tip, just what I was looking for!

  8. January 30th, 2010 at 10:42 | #8

    I like the article! OpenDNS also allows for filtering (pishing, porn, etc), but it needs to know the IP address the request is coming from to determine what to filter (it’s all configurable). Here’s a link to how I solved that problem:

    http://arkienet.com/blog/2010/01/ubuntu-opendns/

  9. January 10th, 2011 at 21:20 | #9

    This tutorial worked very well. Thanks much for posting.

  1. March 14th, 2007 at 16:56 | #1
  2. March 14th, 2007 at 17:29 | #2
  3. March 14th, 2007 at 17:30 | #3
  4. March 16th, 2007 at 03:30 | #4
  5. August 31st, 2007 at 11:02 | #5
  6. August 31st, 2007 at 13:53 | #6
  7. March 22nd, 2008 at 15:31 | #7