Verifying DNS configuration
Previous  Top  Next

First we start the DNS daemon by typing

/etc/rc.d/init.d/named start

Then we type

nslookup 

and we should see something like this

Default Server: email.organicbrownsugar.com
Address: 0.0.0.0



Now we see if our machine's hostname can be resolved to an ip address by typing

email.organicbrownsugar.com

… and we should get an output looking something like this

Server: email.organicbrownsugar.com
Address: 0.0.0.0

Name: email.organicbrownsugar.com
Address: 192.10.1.10

If this is what you see we can be almost sure our DNS server is working well. Now test some of the other names we created before such as

imap.organicbrownsugar.com

and we see

Server: email.organicbrownsugar.com
Address: 0.0.0.0

Name: email.organicbrownsugar.com
Address: 192.10.1.10
Aliases: imap.organicbrownsugar.com

Great! You can now call yourself a BASIC-DNS-LINUX-INSTALLER. But now let's see if our reverse lookup zones work as well by typing:

192.10.1.244

Now if you're your really lucky and didn't make any typo's you should most likely see

Server: email.organicbrownsugar.com
Address: 0.0.0.0

Name: netikus.organicbrownsugar.com
Address: 192.10.1.244

Before we make an end to our endless DNS verifications, we make sure that email servers will have use of our DNS server by finding a mail exchanger (MX) for our domain @organicbrownsugar.com by typing:

set query=mx
organicbrownsugar.com

This should yield

Server: email.organicbrownsugar.com
Address: 0.0.0.0

organicbrownsugar.com preference = 10, mail exchanger = email.organicbrownsugar.com
organicbrownsugar.com nameserver = email.organicbrownsugar.com
email. organicbrownsugar.com    internet address = 192.10.1.10

Okay now, if all this worked our DNS server is configured correctly for stand alone operation and we can type exit to leave nslookup. Please note that we do not have a secondary server at this time which inevitably results in absolutely now redundancy. But since we only have one server for all our services anyways it doesn't really matter for our scenario. You can say a little prayer to the hardware god before you go to bed tonight.

Now the only thing that's missing to make our name resolution life wonderful is to make our DNS daemon start automatically after every boot.