TL;DR
Run curl in.je/ip to get your public IP address instantly from the command line.
The problem
When reviewing logs or troubleshooting network issues, you often need to identify your external IP address. Most people by now use NAT at home, which means standard tools like ifconfig or ipconfig only reveal your internal network address.
You could log into your router or visit a website, but there's a faster way.
The solution: in.je/ip
I built a simple service that returns your public IP address, accessible via standard command-line tools:
# Using curl
$ curl in.je/ip
66.249.76.156
# Using wget
$ wget -qO - in.je/ip
66.249.76.156
The service executes quickly — typically around 0.1 seconds — making it perfect for scripts and automation.
Additional features
The tool supports multiple output formats and additional data types:
Reverse DNS lookup
$ curl in.je/ip/rdns
crawl-66-249-76-156.googlebot.com
Available endpoints
/ip— Plain text IP address/ip/rdns— Reverse DNS lookup/ip/json— JSON formatted response/ip/xml— XML formatted response/ip/geoip— GeoIP information
Use cases
In shell scripts
#!/bin/bash
MY_IP=$(curl -s in.je/ip)
echo "Current IP: $MY_IP"
# Use in firewall rules, DNS updates, etc.
Quick check
Perfect for when you need to quickly verify your external IP, especially when:
- Troubleshooting VPN connections
- Verifying proxy configurations
- Setting up firewall whitelists
- Debugging network issues
Why command line?
Command-line accessibility eliminates browser navigation overhead, enabling direct integration with scripts and pipe operations for automation purposes. It's the Unix way — small tools that do one thing well.
Try it yourself: curl in.je/ip