Is there a built-in command line tool that will do reverse DNS look-ups in Windows? I.e., something like <toolname> w.x.y.z => mycomputername
I've tried:
nslookup
: seems to be forward look-up only.host
: doesn't existdig
: also doesn't exist.
I found "What's the reverse DNS command line utility?" via a search, but this is specifically looking for a *nix utility, not a Windows one.
Should resolve the name from the IP address if the reverse lookup zone has been set up properly. If the reverse lookup zone does not have an entry for the record, the
-a
will just ping without a name.Does what you're looking for. It will tell you the server you're querying and the result.
For example:
The trouble with "ping" is that it's not strictly a name server lookup tool (like nslookup) - for instance if you ping a hostname, it can be resolved to an IP address by a number of methods: DNS lookup, host file lookup, WINS (god forbid) or NetBIOS broadcast. It can also return a potentially out-dated cached result.
The order in which the methods are tried, depends on the clients' TCP/IP configuration and node type flag:
To see the node type of the current computer:
If the resolution method is of no concern, use
or
as you please. If you need to be sure you're querying your DNS server for the correct name, use nslookup.
See also
Use NSLOOKUP with the "-type=ptr" parameter to query the IP address, syntax:
Then the "in-addr.arpa" entry is also printed (even when not found), for example:
Compared to the lower fidelity response when using NSLOOKUP on an IP address without the type parameter:
nslookup will do reverse DNS on windows just as it can do it on linux.
Of course, there isn't a reverse entry for every ip address
Use nslookup like this:
You can use the standard NSLOOKUP command:
In order to get a result there has to be a PTR record registered for the IP address in question.
nslookup will do reverse lookups in Windows.
Under Windows....
Standard ping does NOT return host name of IP address
NSLookup can be used to find this info, if DNS is setup properly
Procedure as follows:
Open DOS prompt
NSLookup
Results will be shown with reverse DNS server address, and host name
9 answers and no one said how to reverse lookup with dig? Its the best
Also, you can add "+short" for use in bash loops, scripts, etc.... forward or reverse :)