On this page:
When web surfing slows down constantly and on many sites, one of the remedies is to try different DNS Servers to see if one is faster than another in your area, since slow DNS lookups are going to result in slow page load times. The easiest way to change is by switching DNS servers, either for the entire local area network (LAN) or for a single machine. Whichever you choose, be sure to back up your current settings, whether by using the router software or by simply writing down the existing servers.
Disclaimer: the possibility and effectiveness of any such change may vary by region and ISP. You can check the possibility of changing by using the OpenDNS site (see below): open a terminal and enter
nslookup -type=txt debug.opendns.com. 22.214.171.124
To set up static DNS for the entire LAN, you need to change the settings in your router. That way, all of the devices on your LAN will use the DNS servers you configured by default, assuming you’re using a typical configuration with your computers grabbing a new local IP address and DNS addresses from your router each time they attach to it.
For most routers, the default address to get to their admin screens from a browser on your LAN is one of these:
Default user/password is commonly admin/admin or admin/password. If that doesn’t work and you have forgotten your password, there is usally a reset button on the back or bottom of the router.
OpenDNS is free for home use, and has some fairly detailed instructions online for many router models. But, they’re all fairly easy to set up for your preferred DNS Servers (see below).
Click the Home Routers button from the Setup page listed below, then on the page that comes up select a configuration (such as “Generalized Router Configuration”) that suits your needs.
Generalized instructions can be found here:
Changes made on the router affect anyone using the LAN. For users connecting directly to the internet without a router, or wishing only to change a particular machine, there are two methods of proceeding.
Network Manager provides a convenient way to set up static DNS servers.
- Right-click the icon in the Notification Area > “Edit Connections…”
- Select the connection you want to use and click the Edit button.
- Go to the IPv4 tab, and change the “Method” to DHCP (Automatic) Addresses Only from the drop down list (assuming your router is assigning your local address via DHCP).
- Put the addresses in the ” DNS Servers” field, separated by a comma.
- Click Save and exit.
When you use DHCP Automatic, Addresses Only you still get your local IP address from your router. But instead of using your router’s DNS server addresses, you can use other addresses for improved performance.
TIP: if you switch DNS servers frequently, you can use the “New” button to set up multiple entries in the Network Connections box, cloning the hardware information and specifying different DNS servers for each.
Open a terminal, become root and type:
After this line #prepend domain-name-servers 127.0.0.1;, copy/paste to add this line (here, OpenDNS servers are being used):
prepend domain-name-servers 126.96.36.199,188.8.131.52;
You can compare your current DNS Server with others by installing namebench and python-tk (so you can see the GUI) and typing this command in a terminal as regular user:
The output will be located in tmp/ as html and csv.
Here are some of the public DNS servers (see Links for others) commonly used:
Google Public DNS:
Norton Connectsafe DNS:
To restore default settings, open Network Manager, and use the drop-down menu to select Automatic (DHCP). When you reboot, the servers supplied by your ISP will be used. You may have to also undo any changes made using the methods above.
Alternatively, you can reedit /etc/dhcp/dhclient.conf to enter settings you have backed up before changing.