I have a linux machine set up on my home network behind a dsl router that is NATing my dsl connection. I currently have my router configured to send port 22 to my linux box which is set up with ssh.
Heres the catch, I am not willing to shell out $15 for a static IP address and every now and then the ip address changes on my dsl connection. I want to track what public ip address I have. I plan on writing a script to:
Find out what my public ip address is*
create a text file with that public ip address in it
upload that test file to a ftp service that I can access
*this is what I need help with. I am not sure what the best way to find it would be. In know I can go to
http://checkip.dyndns.org/ and it will give it to me and I can parse it out. However, I am figuring that to be a lot of trouble. Is there a better way to do it?
Thanks.