This piece of code runs a variation of “dynamic dns” functionality: given a set of host names in a zone, it answers with “the next answer” from a predefined list, in round-robin fashion.
The intended use is in conjunction with RIPE Atlas: if one needs measurements that have multiple targets, then one measure against a target name, which resolves to a different IP every time.
We measured that it’s capable of answering hundreds of queries per second on single server - single thread mode which is enough for our purposes. More servers and more threads further increase capacity and resiliency, though as a consequence the clients would get the same answer multiple times (which may be ok, depending on the specific needs).
The module runs as a PowerDNS “backend”: it runs as a standalone process (potentially multi-threaded), receives translated DNS queries from PowerDNS, provides appropriate answers via the backend API, which in turn are translated back into DNS packets by PowerDNS.
pip install ripe.atlas.dyndns
It will be installed either in your virtualenv or system-wide.
Sample configuration can be generated:
- The backend config:
atlas-pdns-pipe --sample-config > /path/to/atlas-dyndns.conf
- PowerDNS config:
atlas-pdns-pipe --sample-config-pdns > pdns.conf
You should tweak the settings (like log and data directories, server names, …)
You will also find the create-routed-list
command useful. It can help you creating the lists of IP addresses that will used in round-robin
The sample munin scripts are located in the munin
directory.
Precursors, and early implementations for this code include Emile Aben’s “Scapy DNS Ninja” and Zeerover DNS.