Re: LUA for "filter-aaaa-on-v4"

Otto Moerbeek via Pdns-users <[email protected]>
Newsgroups gmane.network.dns.powerdns.user
Message-ID <[email protected]>
On Mon, Oct 30, 2023 at 04:35:25AM +0000, Djerk Geurts via Pdns-users wrote:

> Hi all,
> 
> Not had the opportunity to test this yet, but wanted to check with those more experienced at LUA scripting if the following has any unexpected side effects:
> 
> function preresolve(dq)
>   -- Implementation of 'filter-aaaa-on-v4'
>   if dq.qtype == pdns.AAAA and dq.remoteaddr:isIPv4() then
>     dq.appliedPolicy.policyKind = pdns.policykinds.Drop
>     return false
>   else
>     return false
>   end
> end
> 
> I will run a test when I get the opportunity. Does anyone filter AAAA requests for single stack clients (IPv4 only obviously)?
> 
> Thanks,
> Djerk Geurts

This polciy will also apply to dual stack clients that happen to
contact the rescursor over v4 to request an AAAA. There is nothing
wrong with that, but your policy will cause timeouts for the clients.
So not recommended.

	-Otto
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.