Archive · January 22, 2013

Ubuntu 12 Host or domain name not found. Name service error. Resolv.con - resolvconf

After updating to Ubuntu 12.04 my DNS networking is whacked. Postfix is getting these errors: Host or domain name not found. Name service error Apparently you can't edit the /etc/resolv.conf file directly because it will be overwritten by the 'system'
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
Step 1 - edit this file: /etc/resolvconf/resolv.conf.d/head and add your name server to the file. I'm using Google's DNS server:
nameserver 8.8.8.8
Step 2 - Restart resolvconf
sudo resolvconf -u

Now, when you look at the /etc/resolv.conf file your entry DNS entry will be in it:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
I restarted my networking, "just in case." Not sure if this step is required
service networking restart
I read somewhere that you should add your name servers directly into /etc/network/interfaces. I did this and restarted resolvconf but it didn't write the changes to /etc/resolv.conf
iface eth0 inet static
    address 192.168.3.3
    netmask 255.255.255.0
    gateway 192.168.3.1
    dns-search example.com
    dns-nameservers 8.8.8.8