I am working on setting up DNS in our environment. In the test bed, I was creating some A
records and PTR
records in the forward and reverse lookup zone files. So, I was wondering instead of adding the records manually in two places, will we able to generate the PTR
records programmatically based on the A
records mentioned in the forward lookup zone file.
Does anyone have inputs on how this can be done?
FWIW, I did come across this script mkrdns.pl
from http://www.mkrdns.org/ but that script is throwing below error message. I tried looking around but in vain.
Seems the script is not in active development as the last stable version was released way back in 2002.
./mkrdns-3_3.pl -d /etc/named.conf
<snip>
(debug) Network "arpa.ip6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1", View "default", File "/var/named/dynamic/named.loopback", Type "master".
(fatal) The zone file "/var/named/dynamic/named.loopback" is being used by two zones! Error in config file!
(default:1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa and default:1.0.0.127.in-addr.arpa ...)
I came across this link, which walks you through generating reverse zones from your forward zones using
dnsrev
. It takes a bit of setup and it isn't pretty, but it appears to be more recent than themkrdns
solution.My suggestion would be if possible, use PowerDNS with the PowerAdmin web frontend instead. PowerAdmin makes managing DNS much easier in general in my experience, and it allows you to auto-generate PTR records simply by clicking a checkbox when you create a record.