gotinfo.net by VARØ Industries

Private IP Addresses, NAT and CGNAT Explained

GotInfo guides  |  VARØ Industries

Your laptop says its address is 192.168.1.23. GotInfo says your address is something completely different. Both are correct. The gap between them is network address translation, and knowing where it happens explains why port forwarding works for some people and silently fails for others.

Public and private addresses

A public address is routable on the internet: packets sent to it from anywhere can arrive. A private address is only meaningful inside one network. The private IPv4 ranges are set aside in RFC 1918, and any organization or household may reuse them, which is exactly why they cannot be routed on the public internet: millions of networks use the same numbers.

RangeCIDRAddressesWhere you usually see it
10.0.0.0 to 10.255.255.25510.0.0.0/816,777,216Company networks, cloud VPCs, some home routers
172.16.0.0 to 172.31.255.255172.16.0.0/121,048,576Docker and other container networks, some corporate networks
192.168.0.0 to 192.168.255.255192.168.0.0/1665,536Most home routers (192.168.0.x or 192.168.1.x)
100.64.0.0 to 100.127.255.255100.64.0.0/104,194,304Shared address space for carrier-grade NAT (RFC 6598)
169.254.0.0 to 169.254.255.255169.254.0.0/1665,536Link-local: a device gives itself one when it cannot reach a DHCP server

A common trap is the 172 range. Only 172.16 through 172.31 are private. An address like 172.32.0.5 or 172.15.0.5 is public and belongs to someone. The subnet calculator shows the exact boundaries of any range if you are unsure.

If your computer shows a 169.254 address, it is not a strange provider address. It means the device asked for an address, got no answer, and assigned itself one. Check the cable or Wi-Fi connection and the router's DHCP service.

How NAT works, step by step

Here is what happens when a laptop at 192.168.1.23 loads a web page, with the router's public address shown as 203.0.113.7.

  1. The laptop sends a packet from 192.168.1.23, source port 52144, to the web server on port 443.
  2. The router replaces the source with its own public address and picks a free port, say 203.0.113.7:40001. It records the mapping in its translation table.
  3. The server replies to 203.0.113.7:40001. It never sees the private address.
  4. The router looks up port 40001 in its table, rewrites the destination back to 192.168.1.23:52144, and passes the reply to the laptop.

This is why websites, and the GotInfo home page, see the router's public address and not your device's. It is also why NAT acts as a rough barrier against inbound connections: a packet arriving at the router without a matching table entry has nowhere to go, so it is dropped. That is a side effect rather than a security feature, and it does not replace a firewall.

Port forwarding

To run a game server, a camera or a home server that people can reach from outside, you add a permanent entry to the router's table, called a port forward: "send anything arriving on port 25565 to 192.168.1.50". Many routers can also create forwards automatically through UPnP when an application asks. Both only work if the router's outside address is actually the public address the rest of the internet uses. That is where carrier-grade NAT gets in the way.

Carrier-grade NAT

Because IPv4 addresses are scarce, many mobile carriers and a growing number of fixed-line providers put a second layer of NAT inside their own network. Your router gets an address from the provider's private pool, often in 100.64.0.0/10, and the provider's equipment translates thousands of customers onto a smaller set of public addresses. This is carrier-grade NAT, or CGNAT.

For browsing, streaming and video calls, CGNAT is usually invisible. The problems appear when something needs to accept connections:

How to tell if you are behind CGNAT

  1. Log in to your router and find the WAN or internet address on its status page.
  2. Open the GotInfo home page and note your public IPv4 address.
  3. Compare them.
    • They match: your router holds a public address. Port forwarding should work.
    • The router shows 100.64.x.x to 100.127.x.x: almost certainly CGNAT.
    • The router shows a 10.x, 172.16-31.x or 192.168.x address: there is another router or NAT device between yours and the internet. It might be the provider's modem in router mode, or CGNAT using a private range.
  4. A traceroute to any public host (tracert 1.1.1.1 on Windows, traceroute 1.1.1.1 elsewhere) that shows several private-range hops after your own router is another sign of NAT inside the provider network.

Ways around CGNAT

Private addresses and privacy

Your private address is not secret in any meaningful sense, since thousands of homes use the same one, but browsers have historically exposed it through WebRTC. Modern browsers usually replace it with a random .local name. The Information for Nerds section on the GotInfo home page shows what your browser reports, and the VPN leak test guide explains when that matters.

Compare your router's WAN address with the address the internet sees: open GotInfo.

Related guides