[Pdns-users] LUA script for primary server

Brian Candler b.candler at pobox.com
Mon Jun 6 11:44:16 UTC 2022


On 06/06/2022 11:34, Djerk Geurts wrote:
> Maybe if I add some examples:
>
> 1.2.3.4.5.6.e164.arpa. NAPTR “some text with sip call routing info: AAA”
> *.4.5.6.e164.arpa. NAPTR “some different sip call routing info: BBB”
>
> A query for 9.9.9.4.5.6.e164.arpa. will result in BBB
> A query for 1.2.3.4.5.6.e164.arpa. yields AAA
> A query for 3.3.3.4.5.6.e164.arpa. yields NXDOMAIN
>
> The above is all according to RFC and expected PowerDNS behaviour.

Yep. Depending on your use case and how many domains you have, it might 
be possible to implement

*.e164.arpa. LUA NAPTR "// some LUA code here"

The query name, including the part matched by the wildcard, should be 
available in a query variable 
<https://doc.powerdns.com/authoritative/lua-records/functions.html#query-variables>.

Or there is the Lua2 backend 
<https://doc.powerdns.com/authoritative/backends/lua2.html> (in the 
Ubuntu packages it's in a separate package "pdns-backend-lua2"), or 
other backends 
<https://doc.powerdns.com/authoritative/backends/index.html> like pipe 
and remote.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20220606/e41b5877/attachment.htm>


More information about the Pdns-users mailing list