Monday, September 28, 2009

How to verify whether DNS is working correctly ?

SkyHi @ Monday, September 28, 2009
After you have setup your DNS Server, it's very important to check that the entries which are populated to the Internet are correct. You can use the following checklist using nslookup.

Start nslookup for the desired DNS Server

nslookup
> server 193.247.121.196
Default Server: rabbit.akadia.ch
Address: 193.247.121.196

Check Start of Authority (SOA)

> set q=SOA
> akadia.com
Server: rabbit.akadia.ch
Address: 193.247.121.196

akadia.com
origin = rabbit.akadia.com
mail addr = postmaster.akadia.com
serial = 2000061501
refresh = 10800 (3H)
retry = 3600 (1H)
expire = 604800 (1W)
minimum ttl = 86400 (1D)
akadia.com nameserver = rabbit.akadia.com
akadia.com nameserver = lila.thenet.ch
rabbit.akadia.com internet address = 193.247.121.196
lila.thenet.ch internet address = 193.135.252.2

Check the Nameservers (NS)

> set q=NS
> akadia.com
Server: rabbit.akadia.ch
Address: 193.247.121.196

akadia.com nameserver = lila.thenet.ch
akadia.com nameserver = rabbit.akadia.com
lila.thenet.ch internet address = 193.135.252.2
rabbit.akadia.com internet address = 193.247.121.196

Check E-Mail MX-Records (MX)

> set q=MX
> akadia.com
Server: rabbit.akadia.ch
Address: 193.247.121.196

akadia.com preference = 20, mail exchanger = opal.akadia.com
akadia.com preference = 10, mail exchanger = rabbit.akadia.com
akadia.com nameserver = rabbit.akadia.com
akadia.com nameserver = lila.thenet.ch
opal.akadia.com internet address = 193.247.121.197
rabbit.akadia.com internet address = 193.247.121.196
lila.thenet.ch internet address = 193.135.252.2

Check everything (ANY)

> set q=any
> akadia.com
Server: rabbit.akadia.ch
Address: 193.247.121.196

akadia.com preference = 10, mail exchanger = rabbit.akadia.com
akadia.com preference = 20, mail exchanger = opal.akadia.com
akadia.com nameserver = rabbit.akadia.com
akadia.com nameserver = lila.thenet.ch
akadia.com
origin = rabbit.akadia.com
mail addr = postmaster.akadia.com
serial = 2000061501
refresh = 10800 (3H)
retry = 3600 (1H)
expire = 604800 (1W)
minimum ttl = 86400 (1D)
akadia.com nameserver = rabbit.akadia.com
akadia.com nameserver = lila.thenet.ch
rabbit.akadia.com internet address = 193.247.121.196
opal.akadia.com internet address = 193.247.121.197
lila.thenet.ch internet address = 193.135.252.2

Lookup all hosts within a domain

> ls -d akadia.com


Reference: http://www.akadia.com/services/check_dns.html



$dig @localhost example.com
$dig@localhost MX example.com
$dig @localhost ANY example.com