[Pdns-users] How can I prevent that SOA and ANY queries are passed to a backend if NAPTR was requested?

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jan 15 20:46:52 UTC 2020


Am 15.01.2020 um 19:21 schrieb Matthias Kruzenski:
> Hello,
> 
> I want to use PowerDNS to answer NAPTR queries through the pipe backend. 
> This works, but PowerDNS does not pass a NAPTR request to the backend, 
> but always a SOA request and then an ANY request.
> 
> I only want to pass what was explicitly requested to the backend and 
> nothing else because the server has to process many millions of requests 
> and any overhead is not desired.

This is how PowerDNS works.

1. Find the zone which handles the request. This is done with SOA requests.

Ie. a query for a.b.c.d.e NAPTR triggers a SOA query for a.b.c.d.e. IF 
SOA ist not found, it tries b.c.d.e and so on until a SOA is found. With 
the SOA the Domain-Id is found, which is used for the next query.

2. Fetch the respective ressource record. PowerDNS queries the backend 
always with ANY to get all ressource records ofr the respective label 
(and caches them in the query cache). OF course it will return to the 
client only the requested type, ie NAPTR.

So, you have to return all RRs for a respective label.

regards
Klaus


More information about the Pdns-users mailing list