I would like to setup a recursive DNS server with multiple IPs all on the same PowerDNS server. Let's say:

I was wondering how I could send different responses based on the IP used by the client.

For example, if the client is sendindg his requests to and the site www.example.com would resolve to otherwise, if the client is using and as his DNS server, the response would be

Would this be possible? Maybe with LUA scripting?



In Bind you would do this with ACL and Views.

Powerdns' stance on 'Split-Horizon' or 'Bind Views':

The view we hold is that 'views' make a nameserver needlessly complicated inside. As we aim to keep PowerDNS a simple and secure server, we've decided not to implement views. -Bert

Workaround - You could run multiple instances of powerdns, and use Source Based Policy Routing on IPTables or NAT.

| improve this answer | |

2 powerdns servers on separate ports and redir it using iptables.

| improve this answer | |
  • Why would you use iptables? It would make more sense to just bind each of them to port 53 on their respective IP address. – kasperd Jan 14 '16 at 19:33

This is easy from Lua, indeed. Alternatively you could run two recursors and distribute traffic between them based on client IP, using dnsdist.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.