[Pdns-users] PowerDNS backend for CIDR based bulk CPE definitions (via pgsql)

Dean Hamstead dean at fragfest.com.au
Mon May 11 05:29:34 UTC 2015


Dear Pdns-Users

I am hoping for feedback on a proof of concept (aka quick hack) that has 
powerdns serve forward and reverse DNS records from a template and a 
list of cidr's - implemented via gpgsql. Let's call it a quasi-backend.

The use case is having millions of forward and reverse records for 
customer devices,  where the fqdn is derived from the ip address. But 
without millions of actual records. Cloud providers might also empathize 
with this use case.

Conceptually, you configure just three pieces of data

  * NS and SOA records (global)
  * base domain name and dns template printf style (ie cpe-%d-%d-%%d-%d)
  * list of cidr's associate linked to a template

Functions are called rather than tables (or views), whereby postgresql
presents data to powerdns dynamically generated from the above data.

Why via pgsql? It has useful functions to handle network address's 
compared
to mysql. A lua or c++ backend would still need to draw the minimized
config data from somewhere. So pgsql seemed reasonable to start with.

There are caveats and loose ends, but please take a look on github:

https://github.com/djzort/pdns-backend-pgsql-cidr-based-bulk-cpe


Regards,

Dean Hamstead




More information about the Pdns-users mailing list