How to setup DNS server list on a static IP Ubuntu server?
Knute Johnson
ubuntu at knutejohnson.com
Tue Jan 3 00:36:38 UTC 2012
I had a power hit that required me to reload my Ubuntu server. In the
process I had it running on my local network with DHCP until I got
everything configured. Now I put it up on my wild IP and have had some
difficulty configuring it back to static IP with domain names not
resolving. Ubuntu server 11.10.
/etc/resolv.conf
# 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
This was where you used to put the DNS servers in the older version of
Ubuntu. So I looked in the /etc/network/interfaces file and found;
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 216.240.58.140
netmask 255.255.255.248
network 216.240.58.0
broadcast 216.240.58.143
gateway 216.240.58.137
# dns-* options are implemented by the resolvconf package, if
installed
dns-nameservers
dns-search com
Putting the DNS servers on the 'dns-nameservers' line appears to work
but there are more files, /etc/resolvconf/resolv.conf.d/base, head, tail
and original. original has this in it;
domain ljr-int-wan.frazmtn.com
search ljr-int-wan.frazmtn.com
nameserver 4.2.2.1
nameserver 4.2.2.2
The domain and search were apparently found by the installation program
as that was the correct name for the outside. I did put those name
servers in when I installed too.
The documentation at
https://help.ubuntu.com/11.10/serverguide/C/network-configuration.html
is old and doesn't mention any of these new files or the
/sbin/resolvconf program.
Does anybody know how it is really supposed to be set up and managed?
Or do you know where there is some documentation that applies?
Thanks,
--
Knute Johnson
More information about the ubuntu-users
mailing list