Ubuntu set up internal DNS servers

On my windows PC, I started two ubuntu 12.04 servers with VM player. Named them “panda” and “tiger”, and set the network to “bridge” mode (this way, they are accessible from outside of the hosted PC). Their IP addresses are 10.189.10.x

I also have two spare PCs, and installed Ubuntu 12.04 server on them, named “lion” and “bear”. All 3 computers are connected to same network switch, and all have IP address at 10.189.19.x

I decided to use the box “lion” as the DNS server, whose IP address is 10.189.19.x

sudo apt-get install ssh bind9 bind9utils
then edit the files under /etc/bind, add the internal zone, I assigned domain “rocks” for all the internal servers.
Restart bind9 sudo /etc/init.d/bind9 restart
if there is error, check /var/log/syslog

to test locally
note Ubuntu 12.04 uses “resolvconf” to manage the “resolve.conf” file, you can not edit that file directly any more.
need to update the /etc/resolvconf/resolv.conf.d, create a “tail” file
sudo vi /etc/resolvconf/resolv.conf.d/tail
search rocks
nameserver 10.189.19.x
sudo resolvconf -u
more /etc/resolv.conf to check the current name resolving rules

Use “nslookip” or “dig” to test.

On the other servers, need to copy the “head” file so they will use the new internal DNS server

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s