Road to the Bastille

Sometimes all we want is to figure out our public IP address. Sometimes life is just that simple: grab the IP and move on. But when you are in a sea of servers after navigating through a maze of SSH tunnels, where are you? What server is this?

Sure, you can just open the browser, go to the AWS console, search for that particular instance (probably takes two or three attempts until getting the correct instance name, assuming you know the right region to search for), and then figure out it only has internal addresses…

I’m too lazy to go that route again. So I made a little web server to answer that question for me:

Usage is straightforward: make a GET request to my hosted server at For example, using curl:

$ curl -L


And if you still care about want your IPv4 instead, you can also check it out:

$ curl -L -4

Way easier and faster than navigating the cloud provider’s console :)

You can always force curl to use a specific IP version with -4/--ipv4 or -6/--ipv6. Whether your connection uses IPv4 or IPv6 by default depends on your local network setup and ISP, you might not even have IPv6.

The source code for this project is available at GitHub:heitorPB/ I coded it in Rust, using Axum for the web server, built the Docker image via Nix and hosted it in a Flying Cloud.

And this is totally reinventing the wheel. There are plenty of other services online that also show your IP. And now there’s one more 🙃 So, why make it? For fun, to practice Rust, learn Axum and to have something to blog about here.