FRDNS Revisions - now with added ping checks!
I originally wrote frdns to find and warn about inconsistencies in forward and reverse DNS records. At the time I was also using a tool called hawk to show both IPs that didn’t have a reverse record and reverse records that didn’t have a responding IP address associated with them (we had a lot of orphaned records).
While hawk did the job it required a MySQL instance, a daemon process
and an apache server to function - which was a PITA when it had to be moved
to another server. So I improvised. The first step was adding a
-p
option to frdns that makes the program ping each IP
specified and flag the address if it doesn’t have a reverse record. This
points out IPs that don’t have DNS records. As for the no longer needed
records I’ve got a different tool for that - but that’s for another blog
post.
I’ve also made frdns log both run time and how many issues it flags to syslog. The ping check can take a while so I added this to help me keep an eye on its performance. I did think about using one of the asynchronous DNS libraries to improve performance but we’re only running it once a day to pick up mistakes so a long runtime isn’t a huge issue.