I’ve spent a lot of my life building networks and doing crazy things with networking stuff. As I’ve aged and matured–please, don’t giggle–I sometimes get confused as to what Internet Protocol (IP) address the world actually identifies me with. This is especially true with Amazon Web Services (AWS), which has accomplished far more insanity than I could ever dream of–cloud networking gets messy fast.
In this quick blog post, I’m going to tell you a little bit about the issue some of our Hurricane Labs’ administrators were experiencing with AWS, along with the neat tool I discovered to resolve this problem.
Quick AWS troubleshooting story
When we were troubleshooting a problem in AWS recently, some of our admins thought we should be seeing things–servers in this case, but it could be anything with an IP address–as one IP address, and others who thought the IP would be something different.
We were running a headless server, so using a web browser and going to WhatIsMyIP.com was out of the question (seriously, just go there and look at their source it’s… a LOT). So, I started thinking, ‘Wow, there should just be a simple API response to this.’ And after further consideration, I figured, ‘Hey, I’ll just write one!’
Then, I Googled. Turns out someone must’ve had the same problem as me and already wrote a thing for it.
Enter: ipify API
ipify API is a solution that does exactly what I described above. If you’re going to utilize it, you can use a web browser; however, if you don’t have one–like we didn’t–you can use curl and it will return only your public IP.
Step 1: Just ask for the IP, no funny business