[Pdns-users] PowerDNS forwarding to Consul

jweber at cofront.net jweber at cofront.net
Wed Jan 27 23:23:34 UTC 2016


I'm currently using pdns authoritative server to serve the zone 
"svc.example.org". Queries reach my authoritative servers via a forwarding
configuration implemented by the global dns admins for my organization.

Recently we've been testing Consul for service discovery and health checks. The
Consul software can expose details about this information via DNS, and a
traditional configuration is to forward queries from your local dns server to
a subdomain handled by Consul. Example configurations for BIND and Dnsmasq are
here : https://www.consul.io/docs/guides/forwarding.html

Essentially I would like the following to happen:

Queries forwarded by the global dns servers headed toward
 "consul.svc.example.org" to be forwarded on to the consul server group.

Queries forwarded by the global dns servers headed toward
 "svc.example.org" to be handled by my current authoritative server.

The global dns servers cannot speak to consul directly so they must flow through my
infrastructure.

As far as I can tell from reading documentation to achieve this with PowerDNS
I would need to run the recursor and send queries in general to my authoritative
server, and send consul bound queries to the consul server.

Is there an easier way to achieve this? I've gotten this configuration working locally
and it seems to be doing what I want.

If this is the preferred configuration is there anyway to have the recursor only handle
queries for the items I've configured directly and not try to do recursion? Essentially
only handle queries for forwarded zones and ignore everything else. I've set the hints
file to an empty file, but I'm not sure if this is subtly wrong looking at dig output.




More information about the Pdns-users mailing list