hostname-is-private
Check whether or not an hostname refers to a private IP
Setup
npm install hostname-is-private
Usage
isPrivate(hostname: {String}, f: (err : {Error,Null}, isPrivate: {Boolean}))
var isPrivate = isPrivate; ; ; ;
isPrivateIncludingPublicIp(hostname: {String}, f: (err : {Error,Null}, isPrivateIncludingPublicIp: {Boolean}))
var isPrivateIncludingPublicIp = isPrivateIncludingPublicIp; ; ; ;
How it works
It uses dns.lookup underneath and ip.isPrivate to check if the resolved IP is private (or not).