-
Notifications
You must be signed in to change notification settings - Fork 974
Lua Examples (Authoritative LUA records)
Peter van Dijk edited this page Jul 5, 2023
·
6 revisions
If you cannot use ALIAS records because you depend on the DNSSEC live signing feature, you can use LUA-records as an alternative. The example below utilizes a CNAME record (www.example.com) inside the zone to point the actual target and provides an A (IPv4) and AAAA (IPv6) record.
example.com 3600 IN LUA A ";local r=resolve('www.mycdn.example.net', pdns.A) local t={} for _,v in ipairs(r) do table.insert(t, v:toString()) end return t"
example.com 3600 IN LUA AAAA ";local r=resolve('www.mycdn.example.net', pdns.AAAA) local t={} for _,v in ipairs(r) do table.insert(t, v:toString()) end return t"
www.example.com 3600 IN CNAME example.comPlease also read the PowerDNS Documentation that is available from https://doc.powerdns.com/