Thank you for your help. I am using Ubuntu 12.04 and had similar problems (I could load one webpage, one time, and then the DNS server look-up failed error would appear). Installing dnsmasq, creating the config file /etc/dnsmasq.d/dnsmasq.conf and putting "server=" in there, then rebooting, appears to have completely solved my problem.

Quote Originally Posted by hawkmage View Post
There are a couple ways of fixing this depending on what version of Ubuntu you are using and what services are runing.

Are you using Ubuntu Desktop 12.04? If you run the nslookup to look up a name is the server localhost or If so Network Manger is running an instance of DNSMasq that is getting in the way of switching to the DNS servers other than what you get via DHCP. TO fix this you will need to edit the /etc/NetworkManager/NetworkManager.conf file and comment/remove the line "dns=dnsmasq". From here you can either install the full dnsmasq and add lines to the /etc/dnsmasq.d/dnsmasq.conf like "server=" to make it use Google's DNS. Or don't install dnsmasq and configure the resovconf service template files to include the DNS servers you want. You would edit the /etc/resolvconf/resolv.conf.d/base file and add the lines like you would in the /etc/resolv.conf.

Prior to Ubuntu 12.04 you would likely have had issues with your resolv.conf being overwritten and you would have had to edit your /etc/dhcp/dhclient.conf file to add something like "supersede domain-name-servers;"