DNS

Do a Reverse DNS Lookup in Linux

Do a Reverse DNS Lookup in Linux
DNS process is known as forwarding DNS resolution in which it resolves the domain name with an IP address. Whereas, Reverse DNS Resolution or Reverse DNS lookup, also known as rDNS, is used to determine or resolve the IP address associated with the domain name. As the name implies, it is a reverse DNS lookup process that resolves an IP address back to the domain name.

Reverse DNS lookup is used by email servers to validate and block spam email messages. If the rDNS check fails, then Email servers by default mark the incoming messages as SPAM. Most of the time, email servers automatically reject the messages from an IP address that does not contain rDNS in place. Therefore, if you need to add an rDNS, you can contact your hosting or IP provider to do it.

In this article, we will explain how you can perform the reverse DNS lookup process in Linux through the command line environment.

There are three different commands available in the Linux system that can be used to perform the rDNS lookup process:

Perform the Reverse DNS Lookup Using the dig command

Using the dig command, you can easily perform the rDNS lookup manually through the terminal and show answers that are returned from the name server(s) that were examined. This command gives flexible and clear output, which is the main reason DNS administrators used the dig command to resolve the DNS problems. Use the following command to perform the rDNS lookup in Linux:

$ dig -x ipaddress
$ dig -x 10.0.2.15

Perform Reverse DNS Lookup Using the host command

Host utility converts the names to IP address and vice-versa, as we have discussed above. To perform a DNS lookup using the host command, type the following command:

$ host ip-address
$ host 10.0.2.15

Perform Reverse DNS (rDNS) Lookup Using the nslookup Command

The nslookup is the most commonly used network administration tool that helps check and resolve DNS-related problems. It has two different modes for displaying the output: interactive and non-interactive mode.

The interactive mode displays the information about various hosts and domains against the query. In the non-interactive mode, it only shows the name and relevant requested details for a domain. Use the following nslookup command to display the information about the given IP address:

$ nslookup 10.0.2.15

Conclusion

The reverse DNS lookup is a straightforward method to ensure that the IP address does belong to the specified domain. So, using the above-mentioned commands, you can easily display the rDNS lookup information of a given Ip address. Please, send your query via comments.

Як встановити League of Legends на Ubuntu 14.04
Якщо ви шанувальник League of Legends, то це можливість для вас тестувати League of Legends. Зверніть увагу, що LOL підтримується на PlayOnLinux, якщо...
Встановіть останню стратегічну гру OpenRA на Ubuntu Linux
OpenRA - це ігровий движок Libre / Free Real Time Strategy, який відтворює ранні ігри Вествуда, такі як класичний Command & Conquer: Red Alert. Пошире...
Встановіть найновіший емулятор Dolphin для Gamecube & Wii на Linux
Емулятор Dolphin дозволяє грати у вибрані вами ігри Gamecube та Wii на персональних комп’ютерах Linux (ПК). Будучи вільно доступним і відкритим ігров...