3 ms·
I find that even though I don't pay for a static ip from my internet provider, my ip address does not change much more than once a year or so. I wrote a simple
by ZacharyPitts 11y ago
I find that even though I don't pay for a static ip from my internet provider, my ip address does not change much more than once a year or so.
I wrote a simple script that emails/texts me using AWS SES if my external ip address changes. Very crude, and just runs every 10 minutes via cron on my raspberry pi.
https://github.com/zacharyp/whatsmyip https://github.com/zacharyp/whatsmyip
Then I manually update the DNS I do have that points at that new IP.
- ZoF 11y agoExact same situation here except I use my Plex/NAS box instead of a pi.
- JorgeGT 11y agoI have my DNS managed by CloudFlare only to have access to their DNS API (I don't use their web cache services). If my raspberry cron job detects a change in IP triggers an API request via curl to change the DNS record accordingly.
- ZacharyPitts 11y agoThat's cool. I should look into the Gandi API and update my script :)
- icebraining 11y agoCloudflare has actually made a version of ddclient (a very common dynamic DNS client for Unix systems) that supports their API: https://www.cloudflare.com/resources-downloads/#ddclient https://www.cloudflare.com/resources-downloads/#ddclient
- middleclick 11y agoForgive me if I am wrong, but wouldn't an easier solution just be to record your external IP, then check it periodically using a service and if it changes, notify you?
- ZacharyPitts 11y agoI think that's what my script does, if I'm reading you right. The scripts saves the external ip to a file. Checks every ten minutes to see if it has changed. Emails me if it has changed.