2 minutes
PowerDNS Part 3 - Recursor Server

This post is part of the PowerDNS series.
In the last post, we set up an Authoritative Server to host our DNS Zone. In this post we I will set up the second half of a PowerDNS setup, a Recursor server to handle the majority of DNS queries, and forward requests for our zone to the Authoritative Server.
Installing
To install the PowerDNS Recursor server we need to install the package with:
sudo apt-get install pdns-recursor
Configuration
Configuring the majority of the Recursor server is done through configuration files in the /etc/powerdns/recursor.d
directory. Everything can be put into a single file, but for ease of management I like to split them out into different files.
Address
/etc/powerdns/recursor.d/address.conf
local-address=0.0.0.0
Forward Lookup Zone File - Step 1
/etc/powerdns/recursor.d/forward-zone-file.conf
forward-zones-file=/etc/powerdns/forward-zones.conf
Forward Lookup Zone File - Step 2
/etc/powerdns/forward-zones.conf
hlab.domain=127.0.0.1:5300
Restart
You can now restart PowerDNS Recursor for these changes to take effect. Do so with:
sudo systemctl restart pdns-recursor
Testing
Finally we can test the server from another computer. It is important to test both a public domain and a domain from our zone.
nslookup dns-01.hlab.domain 192.168.0.11
nslookup google.com 192.168.0.11
Use it
With the Recursor working, you can use it as your DNS server. You can do this by setting your DNS server option on your computer, or your router if it supports the option.