one bright sunny day i received a sloppy text file which was most likely exported through a zone axfr and my task was to import the records into a cdn’s dns. the import was not very happy with it, however, i did figure out how to fix the issue without manually editing any data by converting the dns export into bind format.
the command is called
named-compilezone and it’s pretty awesome (included in the bind-utils pkg). essentially all you need to do is import the text file and write it out as raw, then import the raw and export as text. it’s a two step process but you could make it a one-liner:
$ named-compilezone -f text -f raw -o yourfile.com.raw domainname.com originalfile.txt && named-compilezone -f raw -f text -o yournewfile.bind.text yourdomain.com yourfile.com.raw
originally i found the idea on internet systems consortium. in my opinion, they are one of the least known and thanked software companies that have greatly contributed to the internet infrastructure in general.
the software was originally designed at the university of california berkeley (ucb) in the early 1980s. the name originates as an acronym of berkeley internet name domain, reflecting the application’s use within ucb. the software consists, most prominently, of the dns server component, called named, a contracted form of name daemon. in addition, the suite contains various administration tools, and a dns resolver interface library. the latest version of bind is bind 9, first released in 2000.
[credit goes to wikipedia]
when you're a little too careless about virtualizing your domain controllers, cloning, migrating, backing up and restoring, returning from vacation… Read More
systemd is new service manager for linux. it's a replacement for all previous init systems (sysv/sysvinit & ubuntu's upstart) and… Read More