Sometimes my DSL Modem (that has a build in dyndns Client) hangs, and it stops updating
the no-ip.org Server.
I have some notes on my Atom based Linux Server at home and it bugs me if i can’t connect via
ssh from the office.
I wrote a script to mail me the new public ip address as soon as it is changing.
If you have a linux pc/server at home you can do the following by yourself:
put the following php script to your webserver – give it a fancy name like “myip.php”
<blockquote><? echo $_SERVER[‘REMOTE_ADDR’] ?></blockquote>
Start the following script
# m h dom mon dow command
0 * * * * ~/bin/update_ip/update_ip.sh>/dev/null 2>&1
on your local linux server:
IP=`curl -s -o – http://mywebserver/myip.php`
echo “last IP : $LAST_IP – new IP: $IP”
if [ $LAST_IP = $IP ];
echo `date +%d.%m.%y-%R` “ip unchanged”
echo “new ip: $IP”
cat .last_ip | mailx -s “New-IP $IP” MAILADR
echo “$IP” > .last_ip
echo `date +%d.%m.%y-%R` “new IP :$IP” >>ip.log