(Java host to named conversion program)

What is Jh2n?

Jh2n was inspired by the original H2N program written by Paul Albitz and included in O'Rielly's "DNS and BIND" book. I liked H2N but found it seemed more focused and appropriate for one-time conversions of a single domain than the problem I was trying to solve at the time: namely automating the management of the DNS configuration for a modestly sized ISP. I needed a tool that could handle multiple domains, aliases, and give me the flexibility to drive external program's configuration files (such as Sendmail and Apache) from the DNS zone setup.

Jh2n is a java program, and requires JDK2 which can be obtained from Sun's Java site.

What does it do?

Jh2n reads a file in standard host format, pulling the IP addresses, hostnames, domains, and aliases out and uses the host file and configuration options to create an entire BIND 8 or 9 configuration and zone hierarchy. Options allow you to specify the master name servers, output directories, zone file prefixes, networks to include, domains to ignore, root hint files to create, and much much more.

Where do I get it?

The latest version of is jh2n-0.95. Download Jh2n from this site. It comes as a compressed zip archive.
jh2n-0.92 Download Documentation
jh2n-0.95 Download Documentation

This version includes new support for BIND-9, some cleanup and a number of new options that make it more flexible. I have also included some example implementations in the distribution that should be helpful.

How do I use it?

Jh2n will run on almost any system that supports Java2. I have successfully run Jh2n on Red Hat Linux (IBM JDK), Compaq/Digital UNIX OSF1 (CPQ JDK), Sun Solaris (Sun JDK), and Windows 98 (Sun JDK). I have not run Jh2n on a Macintosh system of any kind, but suspect you might have trouble passing command line options on Mac OS9, OSX should have no problems at all.

In general, you will need to create a host file as input and an invoking batch script (some examples are included), that creates the environment for Jh2n to run. Then invoke it and see what it does. Jh2n is not a name server, just a name server configuration helper. You will need a copy of the ISC's BIND or some other BIND compatable name server which will use the files created by Jh2n. You will also need the GNU Java libraries for GetOpt in your CLASSPATH. The libraries can be found in the GNU Java Project Homepage.

The script should invoke Jh2n with the appropriate command-line options, allow the program to create the config and zone files, then send your name server a reload command to cause the new files to be read into the name server daemon.

A complete example installation and html documentation is included in the archive.

But does it work?

Jh2n has been used effectively in the ISP environment it was written in. I have additionally tested it in several large environments and can safely say that it deals with extremely large and complex host files and corporate networks quite effectively. A live host file containing about 6,000 entries was processed in 16 seconds on a Red Hat LINUX P3-700 system with 256meg of ram usind IBM's JDK1.3.

How much does it cost?

Jh2n is open source and free. The source is copyrighted but has been placed under the GNU Public License. It can be used by anyone for almost anything, but cannot be packaged and sold. Any software derivatives of Jh2n must also be released under the GPL. Please read the GPL for more details.

copyright © 2004 Craig Nelson and Sage Studio - comments