NodeJS Forward-confirmed reverse DNS by Joshua Davison
FCrDNS will check the PTR records of an IP address, and will check that there is a valid A/AAAA name entry pointing back to the DNS.
In simpler terms, it checks the hostname of the IP address, and the IP address of the hostname match.
npm install --save fcrdns
Usage is simple, and often best shown in code...
var FCrDNS = require('fcrdns'),
rDNS = new FCrDNS();
rDNS.get('8.8.8.8', function(hostname) {
if (hostname === null)
console.log('Unable to verify Google DNS hostname.');
else
console.log('The hostname for Google DNS is ' + hostname);
});
config
<object> (not yet implemented)ttl
<number>
address
<string>callback
<Function>hostname
<string>cached
<Boolean>
Note that hostname
will be null
if verification failed, or if there was an error.