Wednesday, October 9, 2013

adventures in reverse record creation and ms-dns

ms-dns is bind sometimes mostly.

someone not me created a whole bunch of reverse subnets weirdly.

10.x.x.x Subnet with the subdomains 123 and subdomains 11, 12, 13, 14, 15.  pretty in a gui.  but, hey.

however, when I attempt to create a PTR via dnscmd, a la:

dnscmd /RecordAdd 123.10.in-addr.arpa 1.11 PTR system001.elevennetwork.local

i get unhappy zone not existing and other silliness.

dnscmd /enumzones

i see, among others:

10.in-addr.arpa

oh, i see.  nice.  okay.

dnscmd /RecordAdd 1.11.128 PTR system001.elevennetwork.local

works!

but i a zillion of these addresses.  i simply cannot do this by hand.

i create a file with all of my tasty records however i do as such:

2.11.123 system002.elevennetwork.local
3.11.123 system003.elevennetwork.local
24.12.123 system024.twelvenetwork.local
... you get the hint ...

for /f "tokens=1-2" %i in (tastyrecords) do dnscmd %LOGONSERVER% /RecordAdd 10.in-addr.arpa %i PTR %j

and it works.
Post a Comment