Latest

CGNAT: how to tell if your ISP puts you behind a shared NAT, and what to do when you need to reach home from outside

You forwarded the port, dynamic DNS is up to date, yet you cannot reach your NAS or cameras from outside. The cause is often CGNAT: the public address is not yours, you share it with other customers. Three checks to confirm it, what stops working and four ways around it.

By 6 min read

You set up port forwarding on the router, the dynamic DNS service shows green, but from your phone on mobile data the NAS does not answer. Before redoing the configuration a third time, check one thing: the IP address your router receives from the provider may not be a public address. If so, you are behind CGNAT (Carrier-Grade NAT), and no rule on your own router can work, because the port would have to be opened on a provider device you have no access to.

What CGNAT is, in two lines

IPv4 addresses ran out years ago. To connect more customers than it has addresses, the provider does to its customers what your router does to the devices at home: it puts them behind a NAT and sends hundreds of lines out through the same public address. You end up with two address translations in a row: your router’s and the provider’s.

A reserved range exists for this purpose, defined by RFC 6598: 100.64.0.0/10, that is addresses from 100.64.0.0 to 100.127.255.255. They are not public addresses and they are not the usual home private ranges either (192.168.x.x, 10.x.x.x, 172.16–31.x.x): they are meant for the segment between the customer’s router and the provider’s NAT. CGNAT is very common on 4G/5G mobile connections, fixed wireless and satellite, and on a number of fibre plans.

Three checks to find out if you are behind CGNAT

1. Compare the WAN IP with the public IP

  1. Open the router’s interface and find the connection status page (usually Status, Internet or WAN): write down the WAN IP address.
  2. From a PC on the same network, find the address you use on the Internet. In PowerShell:
Invoke-RestMethod https://api.ipify.org

Or, from Command Prompt or a terminal:

nslookup myip.opendns.com resolver1.opendns.com

Now compare the two values:

Router WAN IP What it means
Same as the public IP You have a public address: port forwarding can work. If it does not, the problem is elsewhere (rule, firewall, service).
Between 100.64.0.0 and 100.127.255.255 You are behind CGNAT.
10.x.x.x, 172.16–31.x.x or 192.168.x.x Double NAT: either you have two routers in a chain at home (for example the provider’s modem plus your own router), or the provider uses private addresses for its own NAT.
Different from the public IP, but not private Rare: ask support, there may be a proxy or a NAT on the provider side.

2. Count the hops to your public IP

Run a traceroute to the public address you just found (replace it in the example):

tracert -d 203.0.113.25

On Linux and macOS the command is traceroute -n. If the reply comes at the first hop, that address is on your router. If it takes two or more hops, at least one other NAT device sits between you and the public address.

3. Check whether you have two routers at home

If the WAN IP is 192.168.x.x, check the cabling before blaming the provider: is your router plugged into another router (the one supplied with the line)? Then the double NAT is inside your home, and you fix it by setting the first device to bridge or modem mode, or by configuring a DMZ on it towards the second router. Only then repeat check 1.

What works and what does not behind CGNAT

Use Behind CGNAT
Browsing, streaming, email, video calls Work: these connections start from home towards the outside
Port forwarding (NAS, NVR, game server, home VPN) Does not work: the inbound connection stops at the provider’s NAT
Dynamic DNS Updates, but points to a shared address: useless
UPnP Opens the port only on your router, not on the provider’s
Online games and P2P Often work with a “strict NAT”: hosting matches may be impossible
Sites with anti-abuse checks More verification (captchas) or temporary blocks, because the address is shared with other customers

Four ways to reach home from outside

1. Ask the provider for a public IP

This is the cleanest solution. Some providers assign a public address (dynamic or static) on request, free or for a monthly fee; others do not offer it on residential or mobile plans. Terms change often: ask support for a “non-shared public IPv4 address” and have them confirm it is not behind NAT.

2. Use IPv6

With IPv6 every device has an address reachable without NAT: a rule in the router’s firewall is enough. The limit is that the network you connect from must have IPv6 too, and not all mobile or corporate networks do. To check, open test-ipv6.com both from home and from your phone on mobile data.

3. A mesh VPN (Tailscale, ZeroTier and similar)

These services install a small client on each device and set up encrypted links that start from the inside towards the outside: that is why they get through CGNAT. When a direct link is not possible, traffic goes through a relay node of the service, still encrypted but slower. It is the simplest way to reach a NAS, Home Assistant or cameras from a phone or laptop.

4. An outbound tunnel to a public endpoint

  • Tunnel to a service (for example Cloudflare Tunnel): suited to publishing a home web service under your own domain without opening ports.
  • VPS with WireGuard: you rent a small server with a public IP, your home router or mini PC connects to it and you come in through it. It takes more skill, but you are in full control.

In both cases the usual rule applies: never publish the admin interface of a NAS, NVR or router, and protect every access with two-step verification.

Frequently asked questions

Does CGNAT make the connection slower?

Normally not: speed and latency depend on the line. The effects show only on inbound connections and in some games.

Does CGNAT protect me?

It prevents unsolicited connections from outside, but it is not a security measure to rely on: it does not stop malware, phishing or compromised devices connecting outwards.

Can I tell if I am behind CGNAT without logging in to the router?

Yes, with the traceroute hop count to your public IP: more than one hop means there is a NAT upstream.

Sources