[net-dns-users] Net::DNS::Zonefile and reverse zones

Chris Buxton clists at buxtonfamily.us
Fri Sep 27 16:27:35 UTC 2013


There's a problem parsing zone files when reverse records are not named with FQDNs.

Here's my input file:


$ORIGIN 191.168.192.in-addr.arpa.
$TTL 1h
@	SOA	ns1.bcn.lab.	root.bcn.lab.	1	1d 15m 6w 5m
	NS	ns1.bcn.lab.
	NS	ns2.bcn.lab.
1	PTR	bcn.lab.
6	PTR	ns1.bcn.lab.
7	PTR	ns2.bcn.lab.
8	PTR	mx1.bcn.lab.
254	PTR	u.bcn.lab.


And after reading this using Net::DNS::Zonefile and simply printing out the records again:


191.168.192.in-addr.arpa.	3600	IN	SOA	ns1.bcn.lab. root.bcn.lab. 1 86400 900 3628800 300
191.168.192.in-addr.arpa.	3600	IN	NS	ns1.bcn.lab.
191.168.192.in-addr.arpa.	3600	IN	NS	ns2.bcn.lab.
1.in-addr.arpa.	3600	IN	PTR	bcn.lab.
6.in-addr.arpa.	3600	IN	PTR	ns1.bcn.lab.
7.in-addr.arpa.	3600	IN	PTR	ns2.bcn.lab.
8.in-addr.arpa.	3600	IN	PTR	mx1.bcn.lab.
254.in-addr.arpa.	3600	IN	PTR	u.bcn.lab.


Notice the origin has been changed to 'in-addr.arpa' for all nodes after the zone apex. I haven't noticed this problem with zones whose names don't end in 'in-addr.arpa'; it appears to be specific to reverse zones, or perhaps to PTR records.

Thanks,
Chris Buxton



More information about the net-dns-users mailing list