Re: change qname before send query to authoritative server through pdns-recursor
Pieter Lexis <[email protected]> Tue, 22 Aug 2017 18:36:04 +0200
| Newsgroups | gmane.network.dns.powerdns.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Kein-Wai, On Mon, 21 Aug 2017 13:58:24 +0000 (GMT+00:00) "Cheung, Kein-Wai" <[email protected]> wrote: > I would like to know if POWERDNS scripting solution (using LUA) it's able > to : > > > > During the Interception of a Query: > > . Grab the qname (dq.qname) > . Compare it or analyse it with some LUA string methods > . Depend of the results, modify the dq.qname > . That qname will be send to the Authoritative server for query > searching and response. It is not possible to directly change the QNAME. However, is it possible to add a CNAME record to another name via dq.followupDomain and set dq.followupFunction[1] to followCNAMERecords[2]. The QName of the query can be inspected in either 'DNSName'-form[3] or strings (by calling :toString()). Hope this helps! Best regards, Pieter 1 - https://doc.powerdns.com/recursor/lua-scripting/dq.html#DNSQuestion.followupFunction. 2 - https://doc.powerdns.com/recursor/lua-scripting/hooks.html#cname-chain-resolution 3 - https://doc.powerdns.com/recursor/lua-scripting/dnsname.html -- Pieter Lexis PowerDNS.COM BV -- https://www.powerdns.com _______________________________________________ Pdns-dev mailing list [email protected] https://mailman.powerdns.com/mailman/listinfo/pdns-dev