27Nov/100

Bash script : DNS Check match between reverse and forward lookup

Basic bash lookup script to check if forward / reverse IP address is matching.

  • The script use host command, it'llĀ  automatically add DNS prefix based on /etc/resolv.conf
  • Support for hostnamesĀ  or PTR address with multiple RR
./checkhost
Usage: ./checkhost <IP or hostname> checkhost<IP or hostname> ...
Example: ./checkhost 69.163.128.215 www pop3.iinet.net.au
This script will check if forward and reverse match

./checkhost shadow pop3.iinet.net.au 202.138.0.9
shadow <-> 69.163.128.215 : Match
pop3.iinet.net.au <-> 203.0.178.192 : Match
mud.starway.net.au <-> 202.138.0.9 : Match

Download the script here :

checkhost

Posted by Rianto Wahyudi

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


9 − = two

No trackbacks yet.