How Do I Enumerate a DNS Server?


Scott Campbell

Enumerating a DNS server can be a useful technique for network administrators and security professionals to gather information about a Target network. By querying a DNS server, we can obtain valuable information about the domain names, IP addresses, and other related records. In this tutorial, we will explore different methods to enumerate a DNS server.

Method 1: Using NSLookup

NSLookup is a command-line tool that is widely used for DNS queries. It is available on most operating systems including Windows, macOS, and Linux. To enumerate a DNS server using NSLookup, follow these steps:

  1. Open your command prompt or terminal.
  2. Type nslookup followed by the IP address or domain name of the DNS server you want to enumerate.
  3. Press Enter.

Note: If you don’t specify any parameter after the nslookup command, it will enter interactive mode where you can execute multiple queries.


In this example, we will enumerate the Google Public DNS server (8.8.8).

$ nslookup 8.8

The output will display various information such as the hostname of the DNS server (if available), its IP address, and other related records like SOA (Start of Authority), NS (Name Server), MX (Mail Exchange), etc.

Method 2: Using Dig

Dig is another powerful command-line tool for DNS queries that provides more detailed information compared to NSLookup. It is commonly available on Linux distributions but can also be installed on Windows and macOS.

  1. Open your command prompt or terminal.
  2. Type dig followed by the IP address or domain name of the DNS server you want to enumerate.

Note: By default, dig will display the answer section of the query. You can use different options to customize the output and retrieve additional information.

In this example, we will enumerate the OpenDNS server (

$ dig 208.222

The output will provide detailed information about the DNS server including its hostname, IP address, supported DNS protocols, and other records like A (Address), AAAA (IPv6 Address), CNAME (Canonical Name), etc.

Method 3: Using Online Tools

If you prefer a graphical user interface or don’t have access to command-line tools, there are several online tools available for DNS enumeration. These tools allow you to perform DNS queries directly from your web browser without any installation required.

Note: Be cautious when using online tools as they may store your query data and could potentially compromise your privacy or security.

In this example, we will use the “DNS Lookup” tool provided by MXToolbox (https://mxtoolbox.aspx) to enumerate the Cloudflare DNS server (1.1.1).

  1. Visit the MXToolbox DNS Lookup page (

Discord Server - Web Server - Private Server - DNS Server - Object-Oriented Programming - Scripting - Data Types - Data Structures

Privacy Policy