NSLookUp instead of Dig
Typically when trying to troubleshoot DNS, I would turn to the ‘dig’ tool that is predominantly a linux tool. Slowly but surely, I have been letting go of my Linux hat and doing a majority things in Windows. In doing so, I have needed to adapt somethings and ‘dig’ seems to be one of those things that I always look to for doing a zone transfer.
There are some cool tools these days to do this via web (ie. https://toolbox.googleapps.com/apps/dig), but sometimes I want to define my dns server or get something specific and quickly. So I guess it’s time I learn to do it the Microsoft way.
In the past I would just normally do a quick ‘nslookup’ or even define the server to query (ie. nslookup <dns server> <domain>). This would do 70% of what I need. So here is what I do now for the other 30%.
First, let’s get to the command prompt:
Start > Run > type ‘cmd’ > Enter
nslookup <<enter>>
<DNS Server> <<enter>>
set q=<query type ie. mx, txt, A, CNAME> (find more here) <<enter>>
<domain name> <<enter>>
Here is an example (my commands are in BOLD):
C:\>NSLOOKUP
Default Server: UnKnown
Address: 192.168.1.254
>NS1.GOOGLE.COM
Server: UnKnown
Address: 192.168.1.254
Non-authoritative answer:
Name: ns1.google.com
Addresses: 2001:4860:4802:32::a
216.239.32.10
>SET Q=MX
>GOOGLE.COM
Server: UnKnown
Address: 192.168.1.254
Non-authoritative answer:
google.com MX preference = 50, mail exchanger = alt4.aspmx.l.google.com
google.com MX preference = 30, mail exchanger = alt2.aspmx.l.google.com
google.com MX preference = 20, mail exchanger = alt1.aspmx.l.google.com
google.com MX preference = 40, mail exchanger = alt3.aspmx.l.google.com
google.com MX preference = 10, mail exchanger = aspmx.l.google.com