As of 2.9.4, a small recursor comes with PowerDNS. The algorithm is influenced by the works of Dan J. Bernstein although all mistakes are ours. Here are the current faults, so nobody can accuse us of false advertising:
Only ignores stale cache entries, does not actually clean them up. May replace them with newer data, however.
Only compiles on Linux and possibly Solaris. FreeBSD 4.x decided not to support the POSIX get/set/swapcontext functions. Bug your favorite FreeBSD kernel or libc maintainer for a fix, or ask him to port MTasker (see below) to your operating system.
It does not do TCP yet, and may have big problems with truncated packets.
To compile, add --enable-recursor to configure and the file pdns_recursor will be compiled. To run on a different port, use ./syncres --local-port=53. To bind to another address, use the local-address setting.
![]() | PowerDNS author bert hubert has the pdns recursor in production and browsing with it works for him. Furthermore, the LARTC mailinglist (2000 subscribers) is using the pdns recursing nameserver. |
Good points:
Uses MTasker (homepage)
Can handle thousands of concurrent questions
Code is written linearly, sequentially, which means that there are no problems with 'query restart' or anything.
Relies heavily on Standard C++ Library infrastructure, which makes for little code (406 core lines).
Is very verbose in showing how recursion actually works.
The algorithm is simple and quite nifty.
At startup, the recursing nameserver reads the file recursor.conf from the configuration directory, often /etc/powerdns or /usr/local/etc.
The following settings can be configured:
If turned on, the recursor will attempt to add AAAA IPv6 records to questions for MX records and NS records. Can be quite slow as absence of these records in earlier answers does not guarantee their non-existance. Can double the amount of queries needed. Off by default.
Directory where the configuration file can be found.
Operate in the background, which is the default.
Local IP address (singular) to bind to. Defaults to all addresses.
Local port (singular) to bind to. Defaults to 53.
Don't log queries.
If turned on, output impressive heaps of logging. May destroy performance under load.