Goal: Generate IPv6 PTR records on the fly.
Additional benefit: Works with known hosts.
0.0.0.b.0.0.3.0.8.b.d.0.1.0.0.2.ip6.arpa {
autoipv6ptr {
suffix lan.mydomain.tld
}
file your.reverse.zone
log
}
1.0.0.b.0.0.3.0.8.b.d.0.1.0.0.2.ip6.arpa {
autoipv6ptr {
suffix servers.mydomain.tld
ttl 60
}
secondary {
transfer from your.master.dns
}
log
}
It's necessary that file
or secondary
comes right after autoipv6ptr
! This plugin always calls the next plugin and checks its return. It will only generate a PTR if a negative result comes back.
Using the docker infrastructure it's easy for you to build a working binary with the plugin:
docker build --pull --no-cache --output type=local,dest=result -f Dockerfile.build .
If everything checks out you'll find an x86_64 binary locally under result/coredns
.
Run:
./result/coredns -conf tests/Corefile -p 1337
Test with dig. Known record:
dig @::1 -p 1337 +short -x 2001:db8:300::10
success.example.com.
Unknown record:
dig @::1 -p 1337 +short -x 2001:db8:300::11
20010db8030000000000000000000011.example.com.