You can use the Name Server Lookup (NSLOOKUP) command to query the Domain Name Service for information about domain names and IP addresses. If you enter a domain name, you get back the IP address to which it corresponds, and if you enter an IP number, then you get back the domain name to which it corresponds. In practice, NSLOOKUP reaches out over the Internetto do a DNS lookup from an authorized name server, and then formats the information returned for convenient display.
If you first set the type to mx with the command “set type=mx”, then NSLOOKUP also returns all sorts of interesting information about the name server that manages the domain that you look up. For additional fun, you can lookup the IP addresses and domain names returned by your first NSLOOKUP query and follow the chain of server administration backward. You end the NSLOOKUP program by typing “exit”. Resources are provided below for running NSLOOKUP on operating systems and websites, and references provided for a similar system called Dig.
NSLOOKUP programs. NSLOOKUP was originally written on a Unix system, and so is easily run on most Linux variants by simply typing “nslookup” on the command line. On Windows systems you need to search your computer for the program “nslookup.exe”. On Macintosh, there are two methods:
- In the Terminal application (found at Applications -> Utilities -> Terminal), nslookup is available and used as with any Unix system.
- For a GUI equivalent, use Applications -> Utilities -> Network Utility, which has a “Lookup” tab in its window. Just enter the address to look up, or the IP for reverse DNS lookup. (Network Utility has a lot of other capabilities as well since it is basically a wrapper around the functionality of a number of Unix network-related command-line utilities.)
Online websites. You can also access NSLOOKUP online from the following websites.
Dig. The Domain Information Groper (Dig) program provides NSLOOKUP type capabilities through DNS lookup, as well as special features like “reverse digs” . You may be able to find Dig installed on a Linux system. The following websites provide online Dig services: