Tuesday, 21 November, 2000

Dynamic DNS

My network at home consists of two Windows 98 boxes and a SuSE 6.4 Linux box, all sitting behind a Linksys Cable/DSL Router hooked to my Road Runner cable modem.  The router serves as a firewall, too, and lets me share things between my computers without having to worry about external attacks.  I configured the router to forward FTP requests to my Linux box, where I have an FTP server that I use periodically for file transfers or to accept large files from friends.  The problem is that I don't have a static IP address.

Today I solved the static IP problem by writing a Delphi program that periodically (once an hour, but it's configurable) queries the router's status page (HTML in ROM) to obtain the current IP address, and compares that value against the previous value.  If the values differ, then the program sends an email (through the SMTP server on my Linux box) to my personal email address and also to my work email address.  It's the low-tech  equivalent of dynamic DNS, which I've looked at but not taken the time to try.

The program's working, but it's not complete.  Right now it runs as a regular program on the task bar, and I need to make it create a task tray icon.  It also requires an SMTP server that will forward emails, which works fine for me, but it'd probably be a good idea to support MAPI and POP3 as well, so people who don't have an SMTP server could still use it.  I used SMTP just because I was curious about setting up and using the SMTP service on my Linux machine.

When I finish the program, I'll put it on my Tools & Utilities page.  If you're interested in the program's source code before then, just drop me a line.