Your IP from the terminal in one command

How to get your external IP, country, city and provider in a second, right from the console: curl, PowerShell, scripts. And what sites learn about you once you move from the terminal to a browser.

Published 4 min read
A keyboard and a terminal with a blinking cursor

You have just opened an ssh session on a freshly rented server. The cursor blinks, and a simple question comes to mind: how does the internet see me right now? There is no browser at hand. You want the answer here, in the terminal.

It takes one command. The block below is not a picture but a real request to our server, and the answer is your own address:

$ curl fpleak.com
203.0.113.42

That is all: one line, no HTML, no ads, no extra words. Run it in a terminal on your own computer and you get the same address as above. Run it on a remote server and you get the server's address. That is the point: you ask the internet, not your settings.

VPN on? Check it, do not trust the icon

A green icon in the corner of the screen proves nothing. The tunnel may be up while the terminal, the browser or one program goes around it: split tunnelling, a forgotten route, a proxy that attached in the wrong place. The honest way to find out is to run the command before the VPN is on and after. The address did not change? Then the tunnel does not work the way you thought.

The country has its own command. The answer is one word, easy to compare in a script:

$ curl fpleak.com/country
Netherlands
$ curl fpleak.com/country-iso
NL

A new server: where is it really

A laptop with a terminal in a dark server aisle

You rented a virtual server in Germany, but the data centre turned out to be in the next country? Or the host resells addresses that are registered far from where the hardware stands? Three short requests tell you more about a server than the page that describes the plan:

$ curl fpleak.com/city
Amsterdam
$ curl fpleak.com/asn
AS64500
$ curl fpleak.com/org
Example Networks

The city, the autonomous system number and the owning organisation. That is enough to know where you landed before the first apt update. The city is approximate, as in any geo database, while the country and the network are usually exact.

When the usual command stays silent

The opposite happens too. A command you have typed for years suddenly hangs without a word: the network administrator blocked the popular address lookup services on the firewall. Scripts hit them by the thousand, so such addresses often land on block lists. You stare at a stuck curl and do not know what happened. It is good to keep one more short command in reserve, one the firewall has not heard of yet. It is easy to remember: the name of the site is the command.

A home server and a floating address

Your provider hands out a dynamic IP, and at home there is a server you need to reach from outside. The address changes without warning. A few lines of script are enough: ask for the address, compare it with yesterday's, and if it differs, update the DNS or send yourself a mail. When you need everything at once, there is JSON:

$ curl -s fpleak.com/ip.json
{ "ip": "203.0.113.42", "country": "Netherlands", "country_code": "NL", "city": "Amsterdam", "timezone": "Europe/Amsterdam", "asn": 64500, "org": "Example Networks" }

With jq you can take any field, for example curl -s fpleak.com/ip.json | jq -r .country_code. On Windows there is nothing to install: in PowerShell, irm fpleak.com/ip.json does the same. All the commands, the Python example and ready scripts are on the Console API page.

The console sees the address, the browser sees almost everything else

A glowing fingerprint on glass

An address is what one request shows. But the site you open learns far more about you, and those small things often tell you apart from other people with exactly the same address. Open FPLeak in an ordinary browser and the test shows what is read from you:

  • Hardware traces. How the graphics card draws an invisible picture, how the audio stack sounds, which fonts are installed. Two identical laptops almost never match.
  • Address leaks. The VPN is on, yet a page gets your real address through WebRTC. The IP leak test and the DNS leak test show it in a minute.
  • The shape of the connection. How the system assembles TCP packets, greets over TLS and talks over HTTP/2 and QUIC reveals what system really stands behind a request. If the browser calls itself Chrome on Windows and the handshake smells of Linux, the disguise has a crack.
  • Your home network. A page in the browser can knock on local addresses and guess the router and the devices nearby from the answers. The local network fingerprint shows what is visible to you.
  • Behaviour. How you type and move the mouse. This is what bot protection reads. On the behaviour test page you can record your own session and watch it in replay.

And a small bonus for those who live with several browser profiles. Press the compare button on the main page and it saves a snapshot of your browser for a day under a temporary link. Open the link in another browser or on another machine and you get a side-by-side comparison of the two fingerprints with a similarity verdict. It is the easiest way to see whether two profiles really differ.

Start with one command, and when you want to see how you look from the inside, run the test. No sign-up needed.

Check what your browser gives away

Run the free fingerprint test: canvas, WebGL, fonts, WebRTC, TCP/IP and TLS, checked for consistency on our server.

Run the test