Port forwarding not working? Check for double NAT and CGNAT

You forwarded the port, the game server or camera is listening, and from outside it still will not connect. Before blaming the firewall, check how many NATs sit between that device and the internet.

What NAT is doing

NAT (network address translation) lets every device in a house share one public address: the router rewrites each outgoing connection and remembers where to send the replies. Replies to connections you started always get back. A brand-new connection from outside has nowhere to go unless you add a port forward rule saying “anything arriving on port 25565 goes to 192.168.1.40”. Wirebook explains it simply in What is NAT?.

A port forward only works on the router that actually owns the public address. Put a second NAT in front of it and the rule never sees the traffic.

The two-minute check

  1. Log in to your router (how) and find the WAN, Internet or Public IP address on its status page.
  2. Open any “what is my IP” page, or run curl https://ifconfig.me.
  3. Compare:
Router's WAN addressWhat it meansCan you port-forward?
Same as the web page showsYour router owns the public addressYes. Look at the rule itself (below).
Private: 192.168.x.x, 10.x.x.x, 172.16–31.x.xDouble NAT: another router is in front of yoursYes, after fixing the double NAT.
100.64.x.x to 100.127.x.x, or any other mismatchCGNAT: your provider shares one public address between customersNo, not over IPv4 from your side.

A traceroute tells the same story: tracert 1.1.1.1 (Windows) or traceroute 1.1.1.1. Two private hops before your provider means double NAT; a 100.64–127 hop means CGNAT.

Fixing double NAT

It usually happens when you add your own router or mesh system behind the box the provider sent. Pick one:

Double NAT also causes the two DHCP servers problem and the “NAT type: Moderate/Strict” warning on consoles.

Living with CGNAT

Many mobile, satellite, fibre and newer broadband providers use carrier-grade NAT because there are not enough IPv4 addresses. You cannot forward ports through it yourself. Options, roughly in order:

If there is only one NAT and it still fails

Why does a forward rule matter at all? Wirebook's interactive lesson How does the router know which device asked? shows a router dropping a friend's unasked-for game connection, then delivering it once a forwarding rule is added.

Related

Console NAT type Strict or Moderate · Good ping and packet loss for gaming · Adding mesh Wi-Fi without double NAT · DHCP and IP address conflicts · Find a MAC address on any device · Public vs private IP address · Log in to your router (192.168.1.1) · Common port numbers explained

Questions

How do I know if I am behind CGNAT?

Compare the WAN IP on your router's status page with the address a 'what is my IP' page shows. If they differ, or the WAN IP is in 100.64.0.0 to 100.127.255.255, you are behind carrier-grade NAT.

What is double NAT?

Two routers in a row both doing NAT, usually the provider's router plus your own. Port forwards on the inner router never receive outside traffic.

How do I fix double NAT?

Put the provider's router in modem or bridge mode, or put your own router or mesh in access-point mode. Forwarding on both routers also works.

Can I port forward behind CGNAT?

Not over IPv4 from your side. Ask the provider for a public IPv4 address, use IPv6, or use an outbound tunnel or VPN service instead.

Why does my Xbox or PlayStation say Strict or Moderate NAT?

Usually double NAT or CGNAT, or UPnP turned off on the router. Fix the double NAT first, then enable UPnP or forward the console's ports.

Published .

Try it

Related guides

Newest guides