Checking DNS zones with h2n

h2n is a Perl script that can translate a host table (ex. /etc/hosts) into DNS zone files and check zone files for RFC violations or other potential problems. I have only used h2n to check existing zone files.

To check zone files with h2n:

1. Download the latest version of h2n at

2. Install the Net::DNS Perl module.
perl -MCPAN -e 'install Net::DNS'

3. Run h2n to verify a DNS zone.
h2n -V zone

Note: h2n may run other auxiliary programs included in the tarball, such as check_del. If you do not put the current path in your directory, I recommend running h2n with the following syntax:

PATH=$PATH:. ./h2n -V zone

Back to

Last modified: 03/28/2003