Some good ways to query DNS records:

nslookup domain.domain
Name: domainserver.domain100.net
Address: 216.20.23.500
(This is the most basic method of requesting DNS information and will provide you with the IP address – OR if you used the IP address will provide you with an A record)

nslookup -query=mx domain.domain
domain.domain          mail  exchanger = 10 dommail.domain.domain
(This will query the MX record for the domain.domain…uhm domain. 😀 )

Other handy NSLOOKUP options you can use with query are:
-query=ns (for finding the name server/s)
-query=any (for finding all the DNS related info)

You can also run NSLOOKUP from the NSLOOKUP interactive client; simply type nslookup and you will open up the client:
In this mode you will need to use the set option to select specific record types to query:
set q=mx
domain.domain
(This will give you the same output found in the mx query example used above)

set q=cname
server1.domain.domain
server1.domain.domain        canonical name = http://www.domain.domain
(This will return the cname for a given domain)

You can also specify a server to use when making these DNS queries:
nslookup
server 8.8.8.8
(This will manually set your the DNS server used to perform your queries)

There are of course many other ways to use the tool so check the help and man pages for more tips.

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