Guides
Am I behind CGNAT?
A one-line check on Linux, how to tell from your router, and what to do if you are.
Behind carrier-grade NAT (CGNAT), your router doesn't have its own public address: the carrier shares one among many customers. Port forwarding can't work there, because the carrier's NAT is upstream of your router. Most 4G and 5G connections and many fiber and cable ISPs do this.
Check from a Linux machine
curl -fsSL https://fieldhand.dev/cgnat.sh | sh
The script only reads: this machine's addresses, the address our server sees, and the first few hops of the route. It changes nothing and works with BusyBox. Read it first at fieldhand.dev/cgnat.sh if you like.
Check from your router
The internet sees you as …. Open your router's status page and find its WAN or internet address:
| Router's WAN address | What it means |
|---|---|
| The same as above | No CGNAT. Port forwarding on the router works. |
100.64.x.x – 100.127.x.x | CGNAT. That range is reserved for carrier NAT. |
10.x, 172.16–31.x or 192.168.x | Another NAT before the internet: the carrier's, or a second router of yours. |
| Any other public address that isn't the one above | CGNAT or a provider proxy. |
On a phone hotspot or a 4G modem you usually can't see the WAN address. Assume CGNAT: almost every mobile carrier uses it for IPv4.
IPv6
IPv6 has no NAT, so a device with a global IPv6 address can in principle be reached directly. In practice carriers and home routers often block inbound IPv6, and the computer you connect from needs IPv6 too.
If you are behind CGNAT
- Ask the provider for a public IPv4 address. Some sell it as an add-on.
- Have the device connect out: a reverse SSH tunnel to a VPS, a mesh VPN, or an agent like Fieldhand. The trade-offs are in reach a device behind CGNAT.
Something wrong or missing on this page? Tell us.