For many years I have used CLI tool nslookup for grabbing any DNS related information. Recently I have switched to different tool called Domain Infromation Grabber or simply DIG. It is like a next gen nslookup as you will see it has many cool features. This short tutorial will show you how to install it under Windows machine.
First, you need to visit the ISC site at http://www.isc.org/downloads. Dig is part of bind installation package. At the time of writing this artice the current stable version is 9.9.6-P1. Choose you your architecture, I’ll go now with x64. Download & Unzip.
Dig requires to have MS C++ Redistributable installed, so install vcredist_x64 first. Now copy dig.exe and all .dll files into C:\Windows\System32\
Now when you are able to execute dig directly from command line:
As you see the output shows several sections. The information we are looking for is under ANSWER SECTION. This querry shows the IPv4 address of opendns.com. Without specifying any options the default DNS server is used. In this case it is 10.0.2.1.
If you want to point the DNS querry to particular DNS server, use @ option. In next example I am asking opendns DNS server about the same domain.
To perform a reverse DNS querry, use -x option. Here I am asking the same server what does IPv4 address 220.127.116.11 resolve to. The answer is api.opendns.com.
Last but not least, you can ask for mail server records MX. Which will return the mail server addresses that opendns.com domain uses.
Dig has many great features, but these few should keep you going for a while. There are also sites such as kloth.net that provide DIG services.