The ServerHub Blog

We are a skilled group of Internet Nerds, with a wild passion for bettering the internet. Here we share our thoughts, ideas, aspirations, and even challenges of running a global platform.

What is Reverse DNS Lookup: The Major Procedures and How to Do it

/content/images/2023/07/Reverse-DNS---Blog.png

The purpose of the Domain Name System (DNS) is to translate human-readable domain names into machine-readable IP addresses. While DNS mainly works in a forward direction, an important related process is reverse DNS lookup or DNS reverse lookup. In this article, we will discuss what is reverse DNS lookup and its uses, and the basic procedures related to DNS reverse lookup such as how to set up reverse DNS lookup, and how to add a reverse lookup zone in DNS.

What is DNS Reverse Lookup

Both reverse DNS lookup and DNS reverse lookup are interchangeable terms and have the same meaning. A related term is DNS pointer record (PTR), which provides the domain name associated with an IP address.

While forward DNS lookup translates domain names into IP addresses, reverse DNS lookup will do the opposite. It maps an IP address to a domain name to provide additional information about the host and its network. Reverse DNS lookup is used for various purposes, such as verifying email sender domains and website authenticity, identifying spam sources and email message origins, improving network security, and troubleshooting network issues.

How to Do a Reverse DNS Lookup

The most common methods to perform a reverse DNS lookup are using:

  • An online tool – There are many online tools that can perform reverse DNS lookups. The free web-based tools are WhatisMyIP.com, DNSqueries.com, Hacker Target, and MX toolbox.
  • A command-line tool – A commonly used tool is nslookup (name server lookup), which is available on most operating systems such as Windows. For example, doing a reverse DNS lookup on the IP address 192.168.1.1. You can do this procedure by opening a Terminal window and typing the following command: This command will show the domain name associated with the IP address.

What is DNS Reverse Lookup Zone

A DNS reverse lookup zone is a special type of DNS that used to manage reverse DNS lookup records, allowing DNS servers to respond to queries for the domain name associated with an IP address. A reverse lookup zone is created by specifying the network ID of the IP address range in reverse order. E.g., for the IP address range of 192.168.0.0/24, the reverse lookup for this will be 0.168.192.in-addr.arpa.

How to Set Up Reverse DNS Lookup

To set up a reverse DNS lookup, you need to create a DNS reverse lookup zone for your IP address range, and add DNS records for each host. To do this using the Microsoft DNS server, do the following steps:
1. Open the DNS Manager console. Right-click on the name of the server. Then select "New Zone".
2. Select "Primary Zone". Then choose "Reverse Lookup Zone".
3. Enter the network ID of your ID address range in reverse order (e.g., for the IP address range of 192.168.0.0/24, enter 0.168.192.in-addr.arpa).
4. Select the appropriate zone file options and click "Finish".
5. Right-click on the newly created zone and select "New Pointer (PTR) Record".
6. Enter the IP address and the hostname of the host.
7. Click "OK" to save the record.
Repeat steps 5-7 for each host in your network. When you have added all the reverse DNS records, you can test the lookup by doing a reverse DNS lookup on one of your IP addresses.

How to Add Reverse Lookup Zone in DNS

To add a reverse lookup zone to your DNS server, you should create a new zone and add PTR records to the new zone. To do this in Windows and Linux distributions, you can use the nslookup command-line tool.
To open the nslookup tool in Windows, do these steps:
1. Open the Command Prompt window by pressing the Windows key + R on the keyboard to open the Run dialog box. Type "cmd". Then press Enter or click OK.
2. In the Command Prompt window, type "nslookup" and press Enter.

To open the nslookup tool in Linux, do these steps:
1. Open a Terminal window by pressing Ctrl+Alt+T on the keyboard.
2. In the Terminal type "nslookup" and press Enter.

To create a new zone, enter the following command in the Terminal:
The < zone file > is the path to the zone file for the new zone. The < domain > name is the domain name for the new zone.

After creating the new zone, you can add PTR records to it by using the following command:
The < ip address > is the IP address and the < domain name > is the domain name for the PTR record.

How Do I Fix Reverse DNS Lookup

If you are having issues with your reverse DNS lookup, you can try the following solutions:
1. Check if the reverse DNS lookup zone and PTR records are set up correctly.
2. Ensure that your DNS server is configured to perform reverse DNS lookups.
3. If you are using a third-party DNS service, check if it supports reverse DNS lookup, and that your records are set up correctly.
4. Verify that your DNS server is authoritative for the IP address range in question.
5. For issues with email delivery, make sure that your reverse DNS records match your forward DNS records, and that they are consistent with your email server configuration.

References:

  1. What DNS Lookups Are
  2. Configure DNS Reverse Lookup Zones
  3. Understanding Forward and Reverse Lookup Zones
  4. How to Set Up Reverse DNS
  5. How to Perform Reverse DNS Lookup
  6. What the NSLOOKUP Tool Can Tell You About Internet Domains
  7. Common Fixes
  8. DNS Reverse Lookup Failed - How to Resolve
comments powered by Disqus