Skip to content

PowerDNS recursor

Configuring Recursor to Forward Queries

The PowerDNS Recursor can be configured to forward queries to dstore, with the following settings.

Recursor 5.1 or later settings in recursor.yml:

logging.protobuf_servers:
- servers: [192.0.2.10]
  timeout: 2
  maxQueuedEntries: 100
  reconnectWaitTime: 1
  taggedOnly: false
  asyncConnect: false
  logQueries: true
  logResponses: true
  exportTypes: [A, AAAA, CNAME]

Recursor 5.0 settings in recursor.yml

recursor.lua_config_file: /etc/powerdns/recursor.lua

Recursor 4.9 or lower settings in recursor.conf

lua-config-file=/etc/powerdns/recursor.lua

For Recursor versions lower than 5.1, the Lua configuration file recursor.lua should then contain a function call to route events from the Recursor to dstore on, say, address 192.0.2.10 as follows:

protobufServer("192.0.2.10:2000", exportTypes={'A', 'AAAA', 'CNAME'}) -- emit events to dstore

The above configuration will log queries/responses for queries received from clients. To log only queries sent by the recursor to authoritative servers, the following configuration should be used:

Recursor 5.1 or later settings in recursor.yml:

logging.outgoing_protobuf_servers:
- servers: [192.0.2.10]
  timeout: 2
  maxQueuedEntries: 100
  reconnectWaitTime: 1
  taggedOnly: false
  asyncConnect: false
  logQueries: true
  logResponses: true
  exportTypes: [A, AAAA, CNAME]

For Recursor versions lower than 5.1, the Lua configuration file recursor.lua should contain the following:

outgoingProtobufServer("192.0.2.10:2000", exportTypes={'A', 'AAAA', 'CNAME'}) -- emit events to dstore

See the PowerDNS Recursor documentation on Lua configuration for more information.