djb_update.pl 12/05/2002 Michael Stella -------------------------------------------------------------------------- Since I couldn't find an existing, non-microsoft solution for updating my DNS with dynamic data from my DHCP server, here's my attempt at making it work with Perl. I've abandoned BIND, due to the stupidity of the people who control the source, and the ongoing security issues. Now I'm using djbdns (http://cr.yp.to/djbdns.html) exclusively. Installation ------------ Disclaimer: This install procedure assumes you know a little bit about how tinydns works. If not, you may have some trouble. In that case, I suggest you go over to http://cr.yp.to and http://www.djbdns.org and READ. We'll assume you have both DHCPD from ISC (http://www.isc.org), and djbdns. If you don't, well, this program might not be for you, unless you have servers that are perfectly compatible. Edit the makefile. There's three parameters at the begining you should change. Don't change anything else, unless you like messing with makefiles. If you do change stuff, don't blame me for it not working. This makefile installs a makefile into the tinydns root directory. It backs up yours, don't worry. I set up each of my zones in a separate file, and use the makefile to cat them all into one (data), then the tinydns-data program to make the data.cdb out of them. If you don't do it this way, you may need to tweak this makefile a little. You will want to rename your existing 'data' file to static.domain.com (using your domain name,of course) so that djb_update.pl can ensure that no dhcp client can specify it's host name to be the same as any of your static dns entries. Then you just run the djb_update.pl program from one of your startup files, and it should start updating your DNS databases. It will print error messages and such to STDOUT, I just redirect mine into my /var/log/messages file. After it runs for the first time, you should do a few nslookups, just to be sure it's working correctly. Warranty: --------- There is none. But if you do have problems, feel free to email me (address at top of this document), and I'll see if I can help you out. When it's convienient for *ME* that is, I'm often really busy, so I might not get back to you right away. Please be patient.