<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 6 Jun 2022, at 12:44, Brian Candler <<a href="mailto:b.candler@pobox.com" class="">b.candler@pobox.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div class="">
<div class="moz-cite-prefix">On 06/06/2022 11:34, Djerk Geurts
wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:BFD0C1C8-603D-4434-92B3-B1BD3B00AE23@maizymoo.com" class="">
<div class="">Maybe if I add some examples:</div>
<div class=""><br class="">
</div>
<div class="">1.2.3.4.5.6.e164.arpa. NAPTR “some text with sip
call routing info: AAA”</div>
<div class="">*.4.5.6.e164.arpa. NAPTR “some different sip call
routing info: BBB”</div>
<div class=""><br class="">
</div>
<div class="">A query for 9.9.9.4.5.6.e164.arpa. will result in
BBB</div>
<div class="">A query for <span style="caret-color: rgb(0, 0, 0);" class="">1.2.3.4.5.6.e164.arpa. yields
AAA</span></div>
<div class=""><span style="caret-color: rgb(0, 0, 0);" class="">A query for 3</span><span style="caret-color: rgb(0, 0, 0);" class="">.3.3.4.5.6.e164.arpa. yields NXDOMAIN</span></div>
<div class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class="">
</span></div>
<div class=""><span style="caret-color: rgb(0, 0, 0);" class="">The above is all according to RFC and
expected PowerDNS behaviour.</span></div>
</blockquote><p class="">Yep. Depending on your use case and how many domains you have, it
might be possible to implement<br class="">
</p><p class="">*.e164.arpa. LUA NAPTR "// some LUA code here"</p><p class="">The query name, including the part matched by the wildcard,
should be available in a <a moz-do-not-send="true" href="https://doc.powerdns.com/authoritative/lua-records/functions.html#query-variables" class="">query
variable</a>.</p><p class="">Or there is the <a moz-do-not-send="true" href="https://doc.powerdns.com/authoritative/backends/lua2.html" class="">Lua2
backend</a> (in the Ubuntu packages it's in a separate package
"pdns-backend-lua2"), or other <a moz-do-not-send="true" href="https://doc.powerdns.com/authoritative/backends/index.html" class="">backends</a>
like pipe and remote.</p>
</div>
</div></blockquote></div>The issue with that is that I would have to create many LUA records, which defeats the point as the LUA record wouldn’t match in the same way that the ‘parent’ wildcard NAPTR record would.<div class=""><br class=""></div><div class="">I disregarded the Lua2 backend as I need the zone to reside in a MySQL backend, I doubt I can split a zone between MySQL and Lua2. Unless I have Lua2 do the SQL queries, but that would make things even more complex.</div><div class=""><br class=""></div><div class="">I’m hoping I can intercept nxdomain responses and rewrite them to a CNAME record answer to the client.</div></body></html>