DNS troubles with Ubuntu Server 12.04

Some customers have been having DNS issues after setting a static IP on Ubuntu 12.04.1 where the server is no longer picking up the DNS settings as it was before; this can be easily fixed by adding the following to /etc/network/interfaces after the eth0 entry:


dns-nameservers [ip.of.your.router]


e.g., for a modem/router that’s on your local network, your /etc/network/interfaces file might look like:


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static


Restart your network with:


sudo /etc/init.d/networking restart


…then try pinging Google or something similar and you should have success 🙂


It’s generally not advisable for Australians to use nameservers located elsewhere, e.g. Google’s public DNS’ or – some things which are unmetered by your ISP may be metered if you do so.





, ,