Check Public IP via Curl
Verify what IP address the internet sees using curl and compare with in-browser tools.
Checking your public IP from the terminal is the fastest way to verify VPN routing without opening a browser. This page covers curl, wget, and PowerShell one-liners against the RookCheck API, plus how to interpret mismatches between terminal and browser results.
curl (Linux, macOS, Windows WSL)
The RookCheck API returns JSON with your visible IP, optional geolocation fields, and request metadata:
curl -s https://rookvpn.com/check/api/ip/address
Pretty-print with jq:
curl -s https://rookvpn.com/check/api/ip/address | jq .
Try this command in RookCurl if you do not have curl installed locally — it runs the request in a browser sandbox and shows headers and timing.
wget
wget -qO- https://rookvpn.com/check/api/ip/address
See the wget example page for wget-specific flags and error handling.
PowerShell (Windows)
Invoke-RestMethod -Uri 'https://rookvpn.com/check/api/ip/address'
On Windows without WSL, PowerShell uses the system network stack directly — useful for detecting split tunneling where WSL and the desktop browser disagree.
(Invoke-RestMethod -Uri 'https://rookvpn.com/check/api/ip/address').ip
VPN verification workflow
Run your chosen command twice: once with VPN disconnected (baseline ISP IP), once with VPN connected (exit IP). The address should change. If it does not, HTTP from that shell is not using the tunnel. Automate the check with the rookvpn-leak-test script or wrap the curl call in your own monitoring.
Compare with browser results
Split tunneling can cause curl and browser to show different IPs on the same machine. Android and iOS often route Chrome/Safari through the VPN profile while leaving terminal apps on the local interface. Always test both when verifying VPN coverage.
Use RookCheck for browser-side IP, HTTP headers, Accept-Language, and geolocation API probes. For full leak coverage (WebRTC, DNS, IPv6), follow the VPN leak testing guide.
API notes
The endpoint is read-only, requires no API key, and is rate-limited per IP. Do not embed it in high-frequency loops; cache results for monitoring dashboards. Response schema may include ip, country, city, and ISP fields depending on GeoIP availability.