External_ip - potentially useful script utility for deep learners with their own server


This is a little tool I made that will text your IP address to you. This is useful if you want to ssh or work on a notebook from outside your local network (usually or and you don’t have a static IP. If you have a static IP and you know the address you don’t need this tool; however, if you have a dynamic IP it will likely change occasionally at the whims of your ISP. This tool will automatically text you the new IP when it changes.

The tool uses twilio as its SMS gateway but feel free to change that if you want. But that means you will need a twilio account if you don’t already have one. I believe twilio gives you $30 when you sign up to use as a trial. You will need to get your credentials, ID and Token, setup a twilio #, and a cell #. Twilio deducts $1 for setting up the phone #'s and $0.0075 per text. So if my math is right (and twilio do indeed credit you $30 into trial accounts?) and you use twilio for nothing else you can get 3,866 free texts from this tool.

I put the files in my home directory as hidden .files so they don’t show up every time I list it out. Just make sure the paths in the scripts are correct for how you want to use it. And make sure the .py and .json are in the same folders or set the path to the .json in the external_ip.py file. Technically, you shouldn’t need the .sh file but it makes running the tool automatically with cron much easier. At least for me, cron didn’t like executing python so I chained it to a shell file. If you use a windows server then you definitely don’t need the .sh file and should just schedule it with Task Scheduler (or Powershell if you prefer).


@jeremy I don’t know if enough people will find this useful but feel free to incorporate it to the fast.ai github if you want.


Clever idea! FYI I use dyndns for this purpose - http://www.noip.com/free .

1 Like

+1 on this, some routers will automatically manage the update to NOIP (stay away from DynDNS).