How to find your IP address: public and local

Every device has two kinds of address. The local one comes from your router and works only at home. The public one belongs to your internet connection, and it is what sites see. The quickest way to see the public one is the my IP page; the local one is in the network settings or one command away.

Updated

On this page

Public and local address

The router gives each device at home a local address, most often 192.168.x.x or 10.x.x.x. Devices find each other by it, and nobody outside sees it.

On the way out, the router swaps it for the one public address of the whole connection. That is the address sites, games and mail servers see. Mobile operators often put many customers behind one public address (this is called CGNAT), so a phone's public address can be shared with strangers.

IPv6 works differently: a device usually gets its own public IPv6 address, with no swap at the router. With a VPN on, sites see the VPN server's address instead of yours, and the local address stays the same.

  • Who gives it

    Local addressYour router

    Public addressYour ISP, or the VPN server when the VPN is on

  • What it looks like

    Local address192.168.1.5, 10.0.0.7, fe80::…

    Public addressAnything else, for example 203.0.113.25

  • Who sees it

    Local addressDevices in your network

    Public addressEvery site and service you use

  • Where to look

    Local addressNetwork settings, ipconfig, ip addr

    Public addressThe my IP page, the router's status page

Your public address in a second

  1. 1

    Open the my IP page

    It shows the public address with its country, a rough city and the ISP as soon as it opens.

  2. 2

    Or ask from a terminal

    The commands below print the same address. With a VPN on they print the VPN server's.

Windows: PowerShell or cmd
nslookup myip.opendns.com resolver1.opendns.com

The last address in the answer is yours.

macOS and Linux: Terminal
dig +short myip.opendns.com @resolver1.opendns.com
Any system with curl
curl https://velivpn.com/v/ip

The address, country, city and ISP as JSON.

Your local address on each system

Windows: PowerShell or cmd
ipconfig

IPv4 Address under your Wi-Fi or Ethernet adapter.

macOS: Terminal
ipconfig getifaddr en0

en0 is usually Wi-Fi; a cable adapter is often en1 or higher.

Linux: Terminal
ip -4 addr show

The inet line of your network adapter, or just hostname -I.

  • Android: Settings → Network & internet → Internet → the gear next to your Wi-Fi network. The IP address is in the network details; on Samsung it is Settings → Connections → Wi-Fi → the gear.
  • iPhone and iPad: Settings → Wi-Fi → the (i) next to the network → IP Address.
  • The router: its own page, often 192.168.0.1 or 192.168.1.1, shows the public address it got from the ISP under WAN or Internet status. If it differs from the my IP page with the VPN off, your ISP puts you behind CGNAT.

What an address tells others

From a public address anyone can tell the country, roughly the city, and the ISP or hosting company it belongs to. Not your street or your name: only the ISP can link an address to a contract, and only it knows who had the address at a given moment.

Sites use the address to pick the language and region, to count visitors and to fight abuse. Streaming and banking sites also check whether it belongs to a hosting company, which is how they notice a VPN.

The VPN is on but the address didn't change

  • Reload the page after connecting: the browser may keep an old connection open.
  • Split tunneling may send the browser past the tunnel. Check which apps and sites go direct.
  • The browser may use its own proxy or a VPN extension, apart from the system.
  • If only IPv6 shows your ISP, IPv6 goes past the tunnel: see the guide on IPv6 leaks.

In Veli

The address sites see, in the app

In Veli, Diagnostics → Privacy shows the IPv4 and IPv6 addresses sites see and which DNS servers answer for you, and says “There is a leak” if something goes past the tunnel.

Without the VPN the app shows your address only when you press the button: it doesn't ask for it by itself.

FAQ

Is 192.168.x.x my IP address?

It is your local address inside the home network. Sites never see it. Your public address is a different one, and every device at home shares it.

Why does my IP keep changing?

Most home and mobile connections get a dynamic address: the ISP hands out a new one after a reconnect or every so often. A fixed, static address is usually a paid option.

Can someone find me by my IP?

They can see the country, a rough city and the ISP. Only the ISP knows which customer had the address at a given moment, and it hands that out only on a lawful request.

How do I find a website's IP address?

Ask DNS: nslookup example.com on Windows, or dig +short example.com on macOS and Linux, prints the addresses behind the name.

See what sites see, in one click

Veli is a free client for Windows, macOS, Linux and Android. On a computer, Diagnostics → Privacy shows the address, IPv6 and DNS that sites see.