[plug] automatic DNS file generation

Leon Brooks leon at brooks.smileys.net
Wed May 10 00:13:30 WST 2000


The attached shell script makes all necessary zone files and a
named.conf (but puts them in the current directory instead of /var/named
and /etc respectively) for a BIND v8 DNS by walking through all network
interfaces with a broadcast address, and broadcast-pinging machines on
the attached network. This means that if a machine is down or not
connected at scan time it will not appear in the DNS files.

There is also a ping-every-address mode (untested) for finding Windows
machines (takes a few minutes for a Class C) and a make-every-address
mode (untested) for nominating every possible address in each attached
network, regardless of whether a machine exists there or not.

You might like to try a faster Windows mode using "nmblookup '*'" but
even if you do several scans some Windows machines are likely to not
respond. If you try this, you can then use nmblookup on each address you
find to discover what the machine itself thinks it is named.

Similar tricks can be tried on machines with open POP3 ports and
similar.

This script will almost certainly not work properly for networks larger
than a Class C (/24).

It allows you to get a fully functioning if monotonously-populated DNS
up and running in about 20 seconds. Later on, you can get fancy with the
actual names of machines.

-- 
Dogs have masters. Cats have staff.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makeDNS.sh
Type: application/x-sh
Size: 5116 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20000510/965352be/attachment.sh>


More information about the plug mailing list