Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Flakey static IP' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Flakey static IP
Authored by: derekhed on Oct 27, '04 12:41:18PM

I too am tracking my IP, since sometimes my ISP cannot be trusted and I'll need to access my home server from work. Luckily my ISP (like most) gives me web-space on their server, so I use this bash script to stick my current IP there. You'll need a .netrc with your ftp settings for this to work, and of course the requisite crontab. I had to work out the ftp commands by brute testing, see what works for you.

#!/bin/bash
page=/Users/your_home/ipaddress.html
curl -s http://checkip.dyndns.org > $page
ftp <<**
open home.ISP.net
epsv4
lcd
ascii
put $page ipaddress.html
bye
**



[ Reply to This | # ]
Flakey static IP
Authored by: lullabud on Oct 27, '04 12:52:27PM
A much simpler way to do this is using curl for the upload and skip the temp file and .netrc:

curl -s http://checkip.dyndns.org | curl -T - ftp://username:password@your-domain.com/www/ip.txt


[ Reply to This | # ]
Flakey static IP
Authored by: derekhed on Oct 27, '04 03:19:00PM

Niiiice. Thanks!



[ Reply to This | # ]