Cleaning up DNS zone files...
Ed.Lewis at neustar.biz
Thu Jan 18 17:56:05 UTC 2007
At 12:37 -0500 1/18/07, Forrest Aldrich wrote:
>I've inherited a slew of DNS zonefiles which need to be cleaned up -
>I can use tools like dnslint to indentify errors; however, I wonder if
>someone has a slick hack (script, regex) that can be utilized to run
>through and reformat the zonefiles (forward and reverse) to get them in
>order and tidy.
Load the file into a server and try dig @server <zone> axfr. The
AXFR output will be a nearly correctly formatted file. The gotcha is
the last record - the terminating SOA RR. Remove that plus the other
commented ("^;;") lines and you will have a zonefile.
'Course, you may not be happy with that format, but it is a "correct" format.
Edward Lewis +1-571-434-5468
Dessert - aka Service Pack 1 for lunch.
More information about the bind-users