OpenDNS : accélérez les temps de chargement de vos DNS

From Deimos.fr / Bloc Notes Informatique
Jump to: navigation, search

1 Introduction

Parfois il se trouve que les serveur DNS de votre FAI rament lamentablement. Pendant qu’ils pédalent dans la semoule, vous pouvez allez faire un tour sur OpenDNS histoire de demander son chemin ailleurs.

  • Avant:
time host edit.yahoo.com
real 0m6.074s
  • Apres:
time host edit.yahoo.com
real 0m0.284s

2 Basic Instructions

Please write down your current DNS settings before switching to OpenDNS, in case you want to return to your old settings for any reason.

The DNS Server addresses for OpenDNS are:

  • 208.67.222.222
  • 208.67.220.220

Just add these two lines somewhere near the top of your /etc/resolv.conf :

nameserver 208.67.222.222
nameserver 208.67.220.220

Enjoy!

2.1 Using OpenDNS with DHCP

If you assign your computer's IP with DHCP, it probably overwrites your /etc/resolv.conf. Here's how to fix that:

  • vi /etc/dhcp3/dhclient.conf
  • Change the prepend line to read :
prepend domain-name-servers 208.67.222.222, 208.67.220.220;

This will prepend the OpenDNS addresses to the top of the list. (You can also use "supersede", which will just use them.) You don't have to worry about the DHCP client overwriting settings on each reboot or lease cycle, and your ISP nameservers will still be used as backup.

  • /etc/init.d/networking restart

3 Verifying

Visit http://welcome.opendns.com to test your new settings.

If it works, it will indicates you.