PowerDNS Dynamic Record Generation with LUA script

Ankit Rathod via Pdns-users <[email protected]>
Newsgroups gmane.network.dns.powerdns.user
Message-ID <CAGh7GTGGJe1AyPnPxtkM3d2G3L3vDg9Sx0aHqGYVdnQHr2oWOA@mail.gmail.com>
Dear Team,

I am working on powerdns project.
I have set up PowerDNS Server and recursor @ one of ISP, the Issue I am
facing in Generating IPV6 Reverse records.

I need your Valuable help to pinpoint my mistake.

I am using Pdns Server version 4.5.4 with gsqlite3 backend and Recursor
version is 4.5.11

I can successfully get a Static Reverse entry made in a zone file but
unable to get a Dynamic entry Answer (LUA ).

following are zone file for your ready reference,
IPv6 pool: 2001:df1:cbc0::/48
========================================

root@ns1-RTEL-in:~# pdnsutil list-zone 0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa
Apr 20 13:57:49 gsqlite3: connection to '/var/lib/powerdns/pdns.sqlite3'
successful
Apr 20 13:57:49 gsqlite3: connection to '/var/lib/powerdns/pdns.sqlite3'
successful
Apr 20 13:57:49 [bindbackend] Parsing 0 domain(s), will report when done
Apr 20 13:57:49 [bindbackend] Done parsing domains, 0 rejected, 0 new, 0
removed
$ORIGIN .
*       3600    IN      LUA     PTR "createReverse6('%33%.static6.rtel.in')"
0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa        3600    IN      NS      ns1.rtel.in.
0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa        3600    IN      NS      ns2.rtel.in.
0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa        3600    IN      SOA     ns1.rtel.in
info.rtel.in 2023062314 10800 3600 604800 3600
1.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa
     3600    IN      PTR     ns1.rtel.in
1.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.4.0.0.0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa
     3600    IN      PTR     ns2.rtel.in
8.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa
     3600    IN      PTR     ankit.rtel.in
===============================================================================
NSLookUP results
===============================================================================
root@ns1-RTEL-in:~# nslookup *2001:df1:cbc0:40::11*  ::1
1.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa
     name = ns1.rtel.in.

Authoritative answers can be found from:

root@ns1-RTEL-in:~# *nslookup 2001:df1:cbc0:40::8  ::1*
** server can't find
8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.4.0.0.0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa:
*NXDOMAIN*

*================================================================*
*recursor.conf  file data*

forward-zones+=0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa=127.0.0.1:5300
forward-zones-recurse+=0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa=127.0.0.1:5300


*Kindly help me with this. I have also attached the whole pdns.conf and
recursor.conf file for your reference.*

*Thanks in Advance.*

_______________________________________________
Pdns-users mailing list
[email protected]
https://mailman.powerdns.com/mailman/listinfo/pdns-users
pdns.conf (application/octet-stream, 712 B)
allow-axfr-ips=0.0.0.0/0
allow-notify-from=0.0.0.0/0,::/0
also-notify=103.155.41.11:5300
api=yes
api-key=rtel
default-soa-content=a.RTEL.dns.server. hostmaster.@ 0 10800 3600 604800 3600
 edns-subnet-processing=yes
enable-lua-records=yes
guardian=yes
include-dir=/etc/powerdns/pdns.d
launch=gsqlite3
gsqlite3-database=/var/lib/powerdns/pdns.sqlite3
local-address=0.0.0.0 ::
local-port=5300
 loglevel=7
lua-records-exec-limit=0
master=yes
query-local-address=0.0.0.0 ::
slave=no
 udp-truncation-threshold=8888
webserver=yes
webserver-address=103.155.40.11
webserver-allow-from=0.0.0.0/0
webserver-loglevel=detailed
 webserver-max-bodysize=2
webserver-password=rtel
 webserver-port=8088
recursor.conf (application/octet-stream, 1.4 KB)
allow-from=0.0.0.0/0 , ::/0
api-key=rtel
config-dir=/etc/powerdns
 distributor-threads=4
dnssec=off
ecs-add-for=103.155.40.0/23, 103.160.238.0/23, 2001:DF1:CBC0::/48
 edns-outgoing-bufsize=8000
 edns-subnet-allow-list= 103.155.40.0/23, 103.160.238.0/23, 103.189.86.0/23, 2001:df1:cbc0::/48
forward-zones=rtel.in=127.0.0.1:5300
forward-zones+=40.155.103.in-addr.arpa=127.0.0.1:5300
forward-zones+=41.155.103.in-addr.arpa=127.0.0.1:5300
forward-zones+=0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa=127.0.0.1:5300
forward-zones+=.=8.8.8.8
forward-zones+=.=8.8.4.4
forward-zones-recurse=rtel.in=127.0.0.1:5300
forward-zones-recurse+=40.155.103.in-addr.arpa=127.0.0.1:5300
forward-zones-recurse+=41.155.103.in-addr.arpa=127.0.0.1:5300
forward-zones-recurse+=0.c.b.c.1.f.d.0.1.0.0.2.ip6.arpa=127.0.0.1:5300
forward-zones-recurse+=.=8.8.8.8
forward-zones-recurse+=.=8.8.4.4
hint-file=/usr/share/dns/root.hints
include-dir=/etc/powerdns/recursor.d
local-address=0.0.0.0, [::]
 local-port=53
 log-common-errors=yes
log-rpz-changes=yes
loglevel=7
max-cache-entries=40000000
 max-negative-ttl=60
max-packetcache-entries=5000000
network-timeout=5000
 query-local-address=0.0.0.0 ::
quiet=no
reuseport=yes
setgid=pdns
setuid=pdns
trace=fail
udp-truncation-threshold=8000
 unique-response-log=yes
webserver=yes
webserver-address=103.155.40.11
webserver-allow-from=0.0.0.0/0
webserver-loglevel=detailed
webserver-password=rtel
webserver-port=8087
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.