O R G A N I C / F E R T I L I Z E R: ds: enumerating dns ptr records with dnscmd...

Jul 6, 2007

ds: enumerating dns ptr records with dnscmd...

wow, what an fun topic. :/ it was a little confusing so i figured i'd post it as a gentle reminder for later when i completely forget. let's assume you have a reverse lookup zone of 10.x.x.x. if you want to pull the records for 10.1.1 for example, you could run the command like this:
dnscmd /enumrecords 10.in-addr.arpa. 1.1
it doesn't actually show you semantically how all this gets put together, unless you fork it up like i did. here's the output of an incorrect command format:
c:\>dnscmd /enumrecords 10.in-addr.arpa. 10.1.1

DNS Server failed to enumerate records for node 10.1.1.10.in-addr.arpa.
    Status = 9714 (0x000025f2)

Command failed:  DNS_ERROR_NAME_DOES_NOT_EXIST     9714  (000025f2)

if you notice, it appends the 10.in-addr.arpa zone name to the requested node name of 10.1.1. since 10.1.1.10 doesn't exist, it fails. moving on... i think in older versions, you had to include the "." following the zone, like "10.in-addr.arpa." instead of "10.in-addr.arpa". in either case, it works. you can see though, in the failed command context, it shows two dots trailing 10.1.1.10.in-addr.arpa. coffee time.