Check a bulk of IP for reverse dns

Recently I’ve encounter list of IPs that are related to CoinHive. So I want to check for these IPs DNS. We can do that by using dig command to perform reverse DNS (rDNS).

Reverse DNS (rDNS) is a method of resolving an IP address into a domain name, just as the domain name system (DNS) resolves domain names into associated IP addresses.

I found this script at this site:


for item
		domain=$(dig -x "$item"  +short)
		if [ -n "$domain"  ] ;
			echo "$item" - "$domain"
			echo "$item" result is NULL

Just save this code above in your Linux/*nix machine, and run this command as below:

[email protected]:~# cat ip.txt | xargs bash reverse_dns

The result should be like this:

Any Comments?

This site uses Akismet to reduce spam. Learn how your comment data is processed.