pdns-recursor lua script - redirect query

Grzegorz Chmurzyński via Pdns-users <[email protected]>
Newsgroups gmane.network.dns.powerdns.user
Message-ID <[email protected]>
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
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.