[Pdns-users] Adding a caching nameserver to an existing secondary DNS server

Leen Besselink leen at wirehub.nl
Thu Feb 5 23:32:24 UTC 2009


Nils Breunese (Lemonbit) wrote:
> Hello,
> 

Hi,

> We have a machine that runs PowerDNS as a slave for a couple of
> supermasters. The same machine also functions as a backup MX. I'd like
> to add a caching nameserver to this machine to decrease the time needed
> for DNS lookups, just for use by localhost. How would I set this up? Do
> I install the PowerDNS recursor? Do I need any special configuration
> because the PowerDNS setup we're already running?
> 

We've run several machines with this or atleast a fairly similair
situation for a number of years.

There is one thing you should pay attention to. The 'listening' port 53,
as it's the same for both services, just the addresses are different.

( you can check with netstat -na to see what it's currently or after
configuration changes listening on, on Linux if you add -p you can also
see the processname )

The recursor will be using port 53 on localhost, so you would want to
make sure it only uses that address local-address=127.0.0.1 in
recursor.conf.

The same applies to the authoritive DNS-server, it should listen on the
'outside' address, local-address=12.12.12.12 or whatever the address is
in pdns.conf.

This would create a situation where outgoing queries from the recursor
would be send out from a non-port 53 to authoritive servers on the
internet and questions coming on on 53 for the authroritive server.

If the machine has several on-the-network addresses and you want the
outgoing queries of the recursor to be tied to a send out from a certain
address you can control that with the query-local-address= directive in
the recursor.conf

And when you want to setup a static lookup for the recursor to always
ask the authoritive DNS-server for a certain domain, you can use the
forward-zones= option for that.

> Thanks,
> 
> Nils Breunese.

No problem. I hope it answers your questions.

Have a nice day,
Leen Besselink


More information about the Pdns-users mailing list