Permanently change DNS settings in Ubuntu Server

Solution 1:

Your resolv.conf is probably being overwritten by dhcp.

Are you using DHCP? You can validate by hand editing your resolv.conf and then restarting your dhcp client.

There are overrides for what DHCP provides for most OSes.

I notice you tagged as Ubuntu. Try looking at /etc/dhcp3/dhclient.conf to hardcode your domain-name-server entries.

Good luck.

Solution 2:

I could be mistaken in a server environment, but Joel K is correct in that resolv.conf is being overwritten by DCHP. However the file /etc/network/interfaces can override an interface. if you're running a server, you should probably add all that info statically anyways

Here's a basic article on interfaces