<x-flowed>I tried sending this to the list on Saturday, but it didn't seem to see
the light of day. Trying again, apologies if everyone got this but me.
On Saturday, May 31, 2003, at 10:03 AM, Bill Cole wrote:It basically repeats from there, with different $ORIGIN lines, comments and TXT records. Note that I manage this by way of a shell script wrapper around a perl backend that turns a SIMS-style blacklist into a BIND zone file. The shell script takes a range and comment as input, sorts the new data into the SIMS-style text file as a record with a timestamp, pumps that text file through the perl convertor, and kicks the nameserver to reload the zone. Doing that automation means that there is never a syntactical error in the file, and every record added has common features. The actual lookup for a DNSBL is for an A record, but I have TXT records as well because of the tradition of doing basic documentation of records there.
Bill,
Any chance you might be willing to share this script with the class? Building something like this has been near the top of my list of things to do for some time, but keeps getting knocked back to the bottom lf said list by more pressing needs.
Well, it isn't exactly my most carefully written and robust code....
There was a comment in the perl piece of this that the code is not portable or releasable. I've replaced that with my standard "this code is crap and you can't sell it" license language and put the two scripts up:
http://www.scconsult.com/bill/bladd is the shell (bash) script that takes additions.
http://www.scconsult.com/bill/bltozone.pl is the perl script that bladd must have available which does SIMS blacklist to BIND zone conversion.
You need both Net::CIDR and Net::CIDR::Lite perl modules to make this work. You should probably put both files in /usr/local/bin and only run them as root. BIND should be running for bladd to work. There are paths and hostnames and such hardcoded into both scripts that you will need to change. These programs will eat your dog, rape your cat, and mutilate your children. You have been warned, so don't you dare blame me for whatever happens. You asked for it.
(no, that's not my standard disclaimer for paying clients.... )
You may have noticed that there is no provision made for removing entries. I do removals by editing the master (SIMS-format) file and running bltozone. You may note that I keep my master in the Webserver tree. This is no accident, but you may wish to do otherwise. You may also notice that bladd will happily generate a new master and archive the old one with every run but that it never cleans up after itself and so will eventually eat all of the available storage. I will not be sharing my archive-thinning script, as it is even uglier and very much tied to local preferences.
--
Bill Cole [EMAIL PROTECTED]
############################################################# This message is sent to you because you are subscribed to the mailing list <[EMAIL PROTECTED]>. To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>
