I created DNS zone as in example below. Is there another, clean way to redirect subdomains to IP address? Maybe with bind9 $GENERATE? Can I use regex or iteration with existing DNS software? Where to start, and can DLZ (Dynamically Loadable Zones) solve that?

0-0 IN A
0-1 IN A
0-2 IN A
0-3 IN A

; ... SKIPPED 65k+ LINES

255-253 IN A
255-254 IN A
255-255 IN A

1 Answer 1


I am not so sure about your requirements.

DLZ. DLZ are Dynamically Loadable Zones. Per documentation, they allow to pull records from external driver.

dlz sample {
     database "dlopen driver.so <args>";

zone "example.com" {
     type master;
     dlz sample

Said that, if you put your records in database; it is loading them from external database using driver.so. Remember, it is more like a patch; not a core functionality. It is also used as integration with SAMBA. Such database may slow response times from DNS server.

Stable solution. The fastest and the cleanest way for a moment is to manage Zone as a file. You can easily generate them with templating system, like Jinja2, and deploy with Ansible or Salt. There are set or roles available on the Internet:

It will help you generate reverse zone, validate your records and syntax completely automatically.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .