How do I access the current IP address? Is there a way to execute a program every time it changes? I want to make a program that whenever my IP changes, it will use the Amazon Route 53 API and update a record set with its current IP address. Basically, whenever my IP changes, it will tell amazon where its at so that traffic can be directed to it. I have done some perl, python, go, and bash scripting. Though I'd be most comfortable with python or bash.
You can check your current IP with the
The best you can do is poll something external that will tell you what your translated IP address is. WhatIsMyIP.com provides a service for doing this. See their IP Automation Rules.
Poll both Route 53 and WhatIsMyIP no more frequently than every 300 seconds. If they are different then update Route 53.