[Pdns-users] Recursor and LUA scripting: I don't understand why preresolve answering a CNAME won't cascade to other records
bert.hubert at powerdns.com
Sun May 31 10:14:52 UTC 2020
On Sun, May 31, 2020 at 12:08:36PM +0200, Oscar Koeroo via Pdns-users wrote:
> I’m using the following LUA script to intercept, but I don’t understand
> the results. Why doesn’t the dig get the CNAME to got to the A record I
> have in my domain.local zone? I expected dig to try to get the CNAME
> value of qr.domain.net and the CNAME value of that result, which seems to
> halt there.
So firstly, a resolver is expected to provide a complete answer. If it
supplies only a CNAME, a client can assume there is nothing more. A
stub-resolver won't itself recurse.
> The expected result I was looking for was:
The good news is, we thought of this scenario, and we have this:
"CNAME chain resolution
It may be useful to return a CNAME record for Lua, and then have the
PowerDNS Recursor continue resolving that CNAME. This can be achieved by
setting dq.followupFunction to followCNAMERecords and dq.followupDomain to
“www.powerdns.com”. PowerDNS will do the rest. "
More information about the Pdns-users