100% Micro$oft free!

"Static" IP Addresses, and
How to emulate one using Linux

There are "external" means of determining your IP address such as http://www.whatismyipaddress.com/ and there's also http://www.dyndns.com/ for resetting your IP address.

However, I wanted something totally "internal" to my system that would:

Since my server was running on Linux, this was satisfied by my writing a Linux "bash" script, and placing HTML files within my ISP-provided web-space with pointers containing my current IP address. I have added another more recent script for the Wireless router/modem.
Invoked by a "cron" entry, it: Queries my router (whichever one I'm using) every minute to see if the address has changed. Some days, there have been several changes of IP address. If it has changed,

This email is "optional" (not essential to the operation), but is merely informative. I can look at the script's log file for a record of every disconnect, and how long before service became available again. And remotely, I can browse to one of my domain pages, clicking on the updated link to find my server's current IP address (assuming ncf.ca is up!). The script was revised in early 2009 to confirm once per day that the last FTP of addresses had occurred: FTP has failed silently, leaving a stale address in the NCF links. Embarrassing!

This method exploits the NCF web-space allocation as a "stepping stone" and also works if you have a Domain Name but want to provide content from your web-server. Here is an example using the above template file.

I am not a guru, and the above took a lot of hacking. The hardest part was configuring sendmail, and you are on your own there! The script does not have to be on your server computer, but on a Linux box that can access your router in order to interrogate it to verify that your IP address has not changed.

To see your CRONTAB ...

[whacker@fireball ~]$ crontab -l

# From scratch 10 Feb 2009

# Check to see if router IP address has changed


* * * * * /home/whacker/IP-Update/ST-585-restore.sh %

[whacker@fireball ~]$

Last tweaked Fri Jul 10 09:18:47 EDT 2009