Get external IP in a script
Ever need to get the external IP address of the server a script is running on?
localhost [~] $ curl http://icanhazip.com
129.121.176.228
There's also the more professional looking (yet less fun) alternative URL of http://ifconfig.me/ip
Written by James Barnett
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#