From: Greg Ercolano <erco@(email surpressed)>
Subject: [OSX/LINUX SYSADMIN] A script that converts /etc/hosts into a DNS
   Date: Sun, 07 May 2006 15:28:11 -0400
Msg# 1283
View Complete Thread (4 articles) | All Threads
Last Next
I wrote a little perl script that automatically converts an /etc/hosts file
into an internal DNS server configuration, typical of small business networks:

    http://seriss.com/people/erco/unixtools/hosts2dns/

The script is tested to work under OSX 10.3.9 and 10.4.x, and Fedora Core 3.

I use it on my own internal network just to make DNS management easy.
Thought I'd offer it publicly as a GPL'ed tool as well.

The way it works is you just add/remove hosts in your /etc/hosts file,
then run the script as 'hosts2dns -update' to update DNS with the entries
in the /etc/hosts file.

There are no other config files; it gets everything it needs from your
/etc/hosts file. Simple comment markers are used to help this script
determine eg. which hosts you want added to DNS, and what your domain name is.

Keep in mind this script completely takes over the named.conf and creates its
own zone files; it does not attempt to preserve a previous DNS server config.
So if you have a previous config, tar it off first. Or, try it out on a test
machine before installing it on an actual internal DNS server.

It's a version 0.90, so it's still in 'beta', but it should work fine.

   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: [OSX/LINUX SYSADMIN] A script that converts /etc/hosts into a
   Date: Sat, 17 Jun 2006 18:49:14 -0400
Msg# 1314
View Complete Thread (4 articles) | All Threads
Last Next
Greg Ercolano wrote:
I wrote a little perl script that automatically
[configures a DNS server from info in /etc/hosts file]

    http://seriss.com/people/erco/unixtools/hosts2dns/

The script is tested to work under OSX 10.3.9 and 10.4.x, and Fedora Core 3.

	Added some features + fixes to this script; bumped the version
	to 0.93. See the CHANGELOG for info:
	http://seriss.com/people/erco/unixtools/hosts2dns/CHANGES.txt

	I've been using this script at a few facilities now to get
	their DNS set up going quickly.

	I really like this tool.. why I didn't make it 10 years ago I dunno.

   From: Robert Minsk <rminsk@(email surpressed)>
Subject: Re: [OSX/LINUX SYSADMIN] A script that converts /etc/hosts into a DNS configuration
   Date: Mon, 19 Jun 2006 15:14:49 -0400
Msg# 1315
View Complete Thread (4 articles) | All Threads
Last Next
On Saturday 17 June 2006 15:49, Greg Ercolano wrote:
> [posted to rush.general]
>
> Greg Ercolano wrote:
> > I wrote a little perl script that automatically
> > [configures a DNS server from info in /etc/hosts file]
> >
> >     http://seriss.com/people/erco/unixtools/hosts2dns/
> >
> > The script is tested to work under OSX 10.3.9 and 10.4.x, and Fedora
> > Core 3.
>
>  Added some features + fixes to this script; bumped the version
>  to 0.93. See the CHANGELOG for info:
>  http://seriss.com/people/erco/unixtools/hosts2dns/CHANGES.txt
>
>  I've been using this script at a few facilities now to get
>  their DNS set up going quickly.
>
>  I really like this tool.. why I didn't make it 10 years ago I dunno.

Have you tried h2n (ftp://ftp.hpl.hp.com/pub/h2n/h2n.tar.gz).  If is from the 
guy who wrote the O'Reilly book.  I was fixing a few special cases with him 
and then he got very sick.  Have not heard from him in a few months.  

   From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: [OSX/LINUX SYSADMIN] A script that converts /etc/hosts into a
   Date: Mon, 19 Jun 2006 16:39:25 -0400
Msg# 1316
View Complete Thread (4 articles) | All Threads
Last Next
Greg Ercolano wrote:
I wrote a little perl script that automatically
[configures a DNS server from info in /etc/hosts file]

    http://seriss.com/people/erco/unixtools/hosts2dns/

Robert Minsk wrote:
Have you tried h2n (ftp://ftp.hpl.hp.com/pub/h2n/h2n.tar.gz). If is from the guy who wrote the O'Reilly book. I was fixing a few special cases with him and then he got very sick. Have not heard from him in a few months.

	Thanks! Hadn't heard of h2n.

	(looks it over)

	I think h2n answers a different need; it's more for the advanced user.
	It has lots of options, a separate config file, and allows for editing
	of the zone files after the fact (a nice feature that my tool doesn't
	support). You have to understand DNS terminology just to read the manual.

	hosts2dns answers a different need; to make DNS config as simple
	and unintimidating as possible for folks who know nothing about DNS,
	and just barely understand how to edit an /etc/hosts file.

	I figured advanced users wouldn't bother with my tool, and just go
	straight to regular hands-on direct DNS config techniques, so I didn't
	try to cover that.

	To do any kind of custom DNS config, you'd have to tweak extra DNS lines
	into the script. (eg. MX records, forwarder configs, multiple networks,
	rndc authentication..)

	I wanted to see how simple I could make DNS config from the command line:

		o One executable
		o As few options as possible (only one, really)
		o No config file (all info is in /etc/hosts)
		o Zero understanding of DNS terminology for the installer/maintainer
		o Ease of use over flexibility was the main design goal

	hosts2dns is targeted more to the sysadmin who also happens to be
	the lead TD or the owner of the company ;)

--
Greg Ercolano, erco@(email surpressed)
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Cel: (Tel# suppressed)
Fax: (Tel# suppressed)(new)