[Pdns-users] pdns-recursor lua script - redirect query

Frank @ kiwazo.be frank+pdns at tembo.be
Tue Feb 20 09:30:52 UTC 2024


Hi Grzegorz,

If you're a paying Spamhaus customer, then using their RPZ service might be a way easier solution than redirecting the queries? 

Please see the PowerDNS specific docs at https://docs.spamhaus.com/dns-firewall/docs/source/configuration/power_dns_config.html

Should you have any questions, let me know. 

Cheers,

Frank


Frank Louwers
PowerDNS Certified Consultant @ Kiwazo.be





> On 20 Feb 2024, at 10:22, Grzegorz Chmurzyński via Pdns-users <pdns-users at mailman.powerdns.com> wrote:
> 
> I'm trying to change queries for zen.spamhaus.org to another domain (paid service).
> 
> Convert all type queries on the fly to queries of the following type:
> 4.3.2.1.zen.spamhaus.org -> 4.3.2.1.xxxxx.zen.dq.spamhaus.net
> 
> I wrote the following lua script:
> https://pastebin.com/qssbsNtR
> 
> Redirection via CNAME works, but during DNS queries it always receives a CNAME record, which is then handled with "followCNAMERecords"
> 
> Normal query:
> https://pastebin.com/kAzQPN0r
> 
> Query changed by LUA (add CNAME):
> https://pastebin.com/5y31c1zV
> 
> Is it possible to immediately ask about the A record values of the another domain (4.3.2.1.xxxxx.zen.dq.spamhaus.net) in the LUA script and then return them as a response, instead of adding the CNAME value?
> 
> 
> -- 
> Pozdrawiam,
> GChmurka
> 
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20240220/fb042a09/attachment.htm>


More information about the Pdns-users mailing list