Tag Archives: DNS

Ubuntu 10.04 Server: Quick Fix if your Local DNS Resolution Fails Tips, Tricks and Tutorials 07 AUG 2013

ubuntu-10-logoIf your hosted environment’s DNS services fail rendering your hosted Ubuntu 10.04 server unable to make connections to the outside world (maybe a cURL call to Google or Amazon is required by your system to function), a quick temporary fix is to change your environment’s DNS server settings to point to another, public provider.

To do this, make a change to the /etc/resolv.conf file and enter some new ‘nameserver’ entries which point to public DNS server addresses (which you can usually find with a pretty basic Google search). The most common one to switch to is Google (public DNS servers are at 8.8.8.8 and 8.8.4.4), though OpenDNS is also a pretty popular one (public DNS servers are at 208.67.222.222 and 208.67.220.220).

In practice:

sudo nano /etc/resolv.conf

The resulting changes should look like this:

#temporary fix
nameserver 8.8.8.8
nameserver 8.8.4.4
#existing, currently not working entries
nameserver 41.204.202.244
nameserver 196.7.147.46

The changes are instantaneous, meaning that once you saved the file, those new nameservers will be hit for any outgoing network requests.

Note that this is for Ubuntu 10.04. In Ubuntu 12.04 the handling of resolv.conf changed.

If you want to add your own nameserver address(es) in 12.04, then edit the file /etc/resolvconf/resolv.conf.d/head:

sudo nano /etc/resolvconf/resolv.conf.d/head

and add your nameserver there (eg: Google DNS):

nameserver 8.8.8.8

Save the file and then run

sudo resolvconf -u

Again, no reboot is required, though you might have to restart the network-manager:

sudo service network-manager restart

You can test if your fix is working by running the nslookup command against a valid domain:

nslookup www.google.com

If successful you’ll get a print out of the Server and Address being used to perform the lookup, followed by the Name/Address answer.

How to Flush the Windows DNS Cache CodeUnit 21 JAN 2013

Quite often you can resolve web connection issues by flushing your possibly corrupted or out of date system DNS cache. To flush the DNS cache whilst using Microsoft Vista, Windows 7 or Windows 8 is relatively trivial, making use of the standard ipconfig executable.

First, we need to open a command prompt running under Administrator rights:

  1. Click the Microsoft Start Button in the bottom left corner of the screen
  2. Click All Programs
  3. Click Accessories
  4. Right-click on Command Prompt
  5. Select Run As Administrator

In the command window type the following and then hit enter:

ipconfig /flushdns

If everything runs correctly, you should see the following confirmation:

Windows IP Configuration Successfully flushed the DNS Resolver Cache

Nifty.

And now Google DNS CodeUnit 12 DEC 2009

google_logoSo not content with their ever-expanding empire that basically covers all aspects of life on the Internet as we know it, Google went and released their own DNS system last week, taking yet another deep dig into knowing just exactly what you’re doing on your PC at all point in time, no matter where you might be.

In case you are a little lost here, Domain Name Systems (DNS) are servers that are used to translate human-readable web addresses like http://www.craiglotter.co.za into physical network addresses which correspond with where the servers actual are (e.g. 64.202.1163.87)

Now for the most part, users don’t even know of the existence of these magic translation servers and happily go about using the default DNS server that their ISP provides, but over the last couple of years there have been a bit of shift towards a more competitive market, with companies like OpenDNS and Neustar popping up and offering both free and premium services that are generally better than the ISP offerings simply because the ISPs don’t have a vested interest in actually improving upon the technology.

Anyway, Google has now joined the bandwagon and is offering their very own DNS service, which simply by the fact that it IS a Google offering, automatically means that it should be rock solid, pretty damn clever and remarkably stable right from day 1 already.

And according to Google, using their DNS servers offer you gains in terms of performance benefits and enhanced security, as outlined here and here.

You back yet?

Anyway, to test their new DNS service out, simply change your machine or browsers network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers and you should be ready to go, though more information on exactly how to do that (if you’re feeling not quite up to scratch) can be found here (thanks Google!), including instructions for getting it right on Ubuntu first time around!

Related Link: http://code.google.com/speed/public-dns/