It sounds like you are talking about the resolvconf package.
Install the resolvconf package.
Run
cd /etc/resolvconf/resolv.conf.d
sudo cp -p head head.orig #backup copy, always do this
sudo nano head
The top of the file is a scary warning. The file /etc/resolv.conf is autogenerated from the contents of this file; the warning is there so it will get put in /etc/resolv.conf when /etc/resolv.conf is generated. To the end of the file, add
nameserver <ip_of_nameserver>
Press Ctrl x and answer yes to saving the file. To finish up, regenerate /etc/resolv.conf so the changes are applied right now:
sudo resolvconf -u
Then check the contents of /etc/resolv.conf to see the line you added is now there. Further, it will still be there the next time your machine boots or your network service is restarted, whichever comes first.
/etc/nsswitch.conf. If you configured your host in/etc/hostsand goes nevertheless to your ISP's DNS, it's a misconfiguration inhostsfile, not the DNS config. You was circumventing it with aresolv.conftrick, now you try to replicate a bad behavior by adding a worst one. The feature you use on your server is in the packageresolvconf(renamedopenresolvin Natty). – shellholic Mar 7 '11 at 16:56