The short version
What you call "my IP" is actuallythree different IPs: ① Public exit IP (what every external site sees — open the cleanip.io homepage to see it instantly); ② Private IP (your device's LAN address, e.g. 192.168.1.5); ③ Gateway IP (your router's LAN address, e.g. 192.168.1.1, used to log in to the router admin panel). Below we cover how to find each type of IP on every platform.
1. The Difference Between the Three IPs — Stop Confusing Them
Internet (public)
↓
← ① Public exit IP (e.g. 1.2.3.4, assigned by your ISP)
↓
[ Home router ]
↓
← ③ Gateway IP (e.g. 192.168.1.1, the router's own LAN address)
↓
[ Your computer / phone ]
↓
← ② Private IP (e.g. 192.168.1.5, assigned by the router)| Name | Typical value | How to check (summary) | Purpose |
|---|---|---|---|
| ① Public exit IP | 1.2.3.4 / 2001:db8::1 | Visit the cleanip.io homepage | What appears in site logs; visible to everyone |
| ② Private IP | 192.168.1.5 / 10.0.0.5 | Command line: ipconfig / ifconfig | Your device's address within the local network |
| ③ Gateway IP | 192.168.1.1 / 192.168.0.1 | Command line: ipconfig, check "Default Gateway" | Log in to the router admin panel / local routing |
2. Finding Your Public Exit IP — the Easy Part
2.1 One click in your browser (recommended)
Just open the cleanip.io homepage — we instantly show yourdual-stack exit(IPv4 and IPv6 shown together), along with geolocation, ASN, and a reputation score. No third-party ad tracking, no data collection.
Other options: ip.sb / ifconfig.me / icanhazip.com / ipinfo.io / ip138.com (popular in China).
2.2 From the command line (for developers / servers)
$ curl ifconfig.me
1.2.3.4
$ curl -4 ifconfig.co # force IPv4
1.2.3.4
$ curl -6 ifconfig.co # force IPv6
2001:db8::1
$ dig +short myip.opendns.com @resolver1.opendns.com
1.2.3.42.3 Note: you may have both an IPv4 and IPv6 exit
Home broadband in China (e.g. China Telecom) has IPv6 enabled by default, and browsers prefer IPv6 when both are available. So a "what's my IP" tool may return an IPv6 address when you expected IPv4 — thisis not a leak, it's normal dual-stack behavior. To see your IPv4 exit specifically, visit an IPv4-only domain in your browser (ipv4.ip.sb).
3. Finding Your Private IP / Gateway IP — by Platform
3.1 Windows
C:\> ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.1.5 ← private IP
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1 ← gateway IPPowerShell users: Get-NetIPConfiguration | Format-Table InterfaceAlias, IPv4Address, IPv4DefaultGateway
3.2 macOS
$ ifconfig en0 # en0 is Wi-Fi; en1 is usually wired
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::aede:48ff:fe00:1122%en0 prefixlen 64 scopeid 0x4
$ route -n get default | grep gateway
gateway: 192.168.1.1 ← gateway
$ networksetup -getinfo Wi-Fi # friendlier output
DHCP Configuration
IP address: 192.168.1.5
Subnet mask: 255.255.255.0
Router: 192.168.1.1Graphical interface: System Settings → Network → your current Wi-Fi → Details → TCP/IP — the "Router" field is your gateway.
3.3 Linux
$ ip addr show # private IP
2: enp3s0: <BROADCAST,MULTICAST,UP> mtu 1500
inet 192.168.1.5/24 brd 192.168.1.255 scope global enp3s0
inet6 fe80::aede:48ff:fe00:1122/64 scope link
$ ip route | grep default
default via 192.168.1.1 dev enp3s0 proto dhcp metric 100
$ hostname -I # compact form, shows only the private IP
192.168.1.53.4 iOS (iPhone / iPad)
- Settings → Wi-Fi → tap theⓘinfo button next to your current Wi-Fi network
- "IP Address" = yourprivate IP
- "Router" =gateway IP(your router's LAN IP)
- "Subnet Mask" is usually 255.255.255.0
3.5 Android
- Settings → Wi-Fi → long-press your current Wi-Fi (or tap the gear icon) → Modify network → Advanced
- "Gateway" / "Gateway IP" is the router's IP
- The exact path varies by Android brand (Xiaomi / Huawei / Samsung); search for "Gateway" or "IP settings"
- Or use a third-party app that shows it directly:Wi-Fi Analyzer / Fing
4. Special Cases
4.1 I have a VPN on — my public IP should be the VPN's exit
With a full-tunnel VPN (TUN mode), your public exit IP equals the VPN server's IP. But watch out forleaks:
- WebRTC can expose your real IP — check with /leak our leak test
- If dual-stack IPv6 is only partially routed through the VPN while IPv4 is tunneled, browser IPv6 traffic can bypass the VPN — you'll see an IPv6 exit matching your ISP
- HTTP/SOCKS proxies (non-TUN) don't handle UDP — WebRTC, QUIC, and video call traffic can all leak
See the complete guide to VPN tracing for details.
4.2 My home network is on CGNAT — the router's WAN IP is 100.64.x.x
Log in to your router and check the WAN IP. If it's in the 100.64.0.0/10 range, your ISP has put you behind CGNAT and youdon't have a real public IPv4 address. To do port forwarding or expose services, call your ISP and request a public IP (usually free). See the CGNAT self-check guide for details.
4.3 Multiple network adapters / multiple ISPs — which one is the "real" exit
If your home has both Wi-Fi and Ethernet connected, or your Windows laptop has a USB network adapter plugged in, several adapters may each have an IP — but only the one on yourdefault routeis actually used as the public exit.
- Windows:
route printcheck the Gateway on the "0.0.0.0" row - macOS / Linux:
route -n get default/ip route | grep default
4.4 I'm on public Wi-Fi / a shared network — the public IP is shared via NAT
The exit of a cafe / hotel / public Wi-Fi network isshared by the entire network — hundreds of people may share the same public IP at once. This is often why sites throttle you, force a CAPTCHA, or block you outright due to low reputation. Use the cleanip.io homepageto check the reputation score — below 60 means caution is warranted (common on public Wi-Fi).
4.5 My IPv6 looks like fe80::... — is my network broken?
fe80::/10 is alink-local address, present on every IPv6 network interface —it is not a public IPv6 address, it's only valid within its own subnet. To find a public IPv6, look for one starting with 2xxx:... (a global unicast address). fe80 with no global IPv6 means your ISP hasn't assigned you one.
5. Command Quick Reference
| Goal | Windows | macOS / Linux |
|---|---|---|
| Public exit IP | Visit cleanip.io /curl ifconfig.me | curl ifconfig.me |
| All local IPs | ipconfig /all | ifconfig / ip addr |
| Default gateway | ipconfigcheck Default Gateway | ip route / route -n get default |
| DNS server | ipconfig /allcheck DNS Servers | cat /etc/resolv.conf / scutil --dns |
| Routing table | route print | netstat -rn / ip route |
| Flush DNS cache | ipconfig /flushdns | sudo killall -HUP mDNSResponder / systemd-resolve --flush-caches |
Further Reading
- Complete Guide to Private IPs / Gateways / RFC 1918192.168.1.1, CGNAT, router login guide
- The Complete IPv6 GuideWhy home broadband defaults to dual-stack, and how to manage it
- VPN Tracing and Anti-TrackingUsed a VPN but your real IP still leaked?