Fighting DNS resolving in Ubuntu 12.04 (server)
I recently installed a DNS sever using Ubuntu 12.04. The server should serve only my exernal domain, but should use an internal server for it's own name resolution.
Setting dns-nameservers to the correct ip in /etc/network/interfaces did not work on this host (but does on all my non-dns hosts).
After some digging, I found the cause: resolvconf always reverts to nameserver 127.0.0.1 which in turn queries the hosts in dns-nameservers. Because my host is already a nameserver, 127.0.0.1 points to my bind instance instead of a caching daemon.
The solution I found was to put my entries in /etc/resolvconf/resolv.conf.d/head, this way they end up on top of the resolv.conf file and the real DNS server gets queried first!