Why WireGuard Struggles Behind CGNAT, and What Actually Helps
What CGNAT Is and Why It Affects WireGuard
Carrier-grade NAT (CGNAT) lets an internet provider share one public IPv4 address between many customers. It's common on mobile networks and increasingly on home broadband, because public IPv4 addresses are scarce. Your router or phone gets an address from a shared range (often 100.64.0.0/10, reserved for this purpose in RFC 6598), and the provider's equipment translates it to a public address.
CGNAT doesn't stop you from connecting out to a VPN server. It mainly causes trouble when something needs to connect in to you, such as a WireGuard server you host at home, or two devices both behind NAT trying to reach each other directly.
Why WireGuard Runs Into Trouble
- Hosting at home: a WireGuard server listens on a UDP port. Behind CGNAT you can't forward that port, because you don't control the public address, so incoming connections never reach you.
- Idle timeouts: NAT devices forget UDP mappings that go quiet. If neither side sends anything for a while, the mapping disappears and the next packets from the server are dropped until your side sends again.
- Peer-to-peer between two NATed devices: WireGuard itself doesn't do NAT traversal. Tools built on top of it may try "hole punching", which often fails when one side is behind a strict (symmetric) NAT that changes the external port for each destination.
- Networks that restrict UDP: some networks limit or block UDP traffic, and WireGuard uses only UDP.
As a client connecting to a VPN provider's server, WireGuard usually works fine behind CGNAT. It also handles roaming well: when your phone's address changes, the tunnel continues once a new authenticated packet arrives.
Common Setup Mistakes
| Mistake | Why it hurts | The fix |
|---|---|---|
| No keepalive on a NATed client | The NAT mapping expires while the tunnel is idle, so incoming traffic is lost | Set PersistentKeepalive = 25 on the peer behind NAT (WireGuard's documented sensible value) |
| Trying to port-forward behind CGNAT | The forwarded port is on your router, but the public address belongs to your ISP | Ask your ISP for a public IPv4 address, use IPv6, or use a relay |
| Ignoring IPv6 | Many networks give devices public IPv6 addresses that aren't behind CGNAT | If both ends have IPv6, connect over IPv6 (allow the port in your firewall) |
| Expecting a consumer VPN to expose your home server | A privacy VPN gives your device a new outgoing route; it doesn't open inbound access to your home network | Use a relay server with a public IP, or a mesh VPN tool designed for remote access |
What Actually Helps
- Check whether you're behind CGNAT. Compare the WAN address shown in your router with the address on our what is my IP page. If they differ, or the router shows an address starting with 100.64 to 100.127, you're behind CGNAT.
- For hosting at home: request a public IPv4 address from your ISP (some offer this, sometimes for a fee), use IPv6 if both ends support it, or run the server on a small machine with a public IP that relays to your home.
- For a phone connecting to a VPN service: enable keepalives if you configure WireGuard yourself. If the network restricts UDP or slows down VPN traffic, use a protocol that works differently.
Where Other Protocols Fit
Cap VPN offers three protocols, so you can switch if one doesn't suit a network:
- WireGuard: lean and battery-friendly on stable connections.
- Hysteria2: runs over QUIC (UDP), supports port hopping and recovers quickly from packet loss. Cap VPN uses it by default on mobile data.
- VLESS Reality: runs over TCP and looks like normal HTTPS traffic, useful on networks that block or slow down VPN connections, including those that restrict UDP.
None of these makes your home server reachable from outside. They help your device's own connection out to the VPN server.
FAQ
Can I use WireGuard at all behind CGNAT?
Yes, as a client connecting out to a server with a public address, which is how VPN services work. Hosting a WireGuard server behind CGNAT needs IPv6, a public IPv4 address from your ISP, or a relay.
Why does my self-hosted WireGuard drop when my phone is idle?
Usually a NAT mapping expires while nothing is being sent. Setting PersistentKeepalive = 25 on the side behind NAT keeps it open.
Can a privacy VPN give me access to my home server?
Not on its own. A privacy VPN such as Cap VPN protects your device's connection out to the internet. Reaching a server at home behind CGNAT still needs IPv6, a public IPv4 address or a relay.
Do I still need a relay server?
For reaching a home server behind CGNAT without IPv6 or a public IPv4 address, yes, a relay with a public IP is the usual answer.
The Bottom Line
CGNAT breaks inbound connections, not outbound ones. If you host a WireGuard server at home, you need IPv6, a public IPv4 address or a relay. If you just want a reliable VPN on your phone, keepalives and the right protocol for each network matter more than anything else.
Editorial Transparency: This article was written with AI assistance and thoroughly fact-checked by the CapVPN editorial team. Read our correction policy.
Frequently Asked Questions
What CGNAT Is and Why It Affects WireGuard
Carrier-grade NAT (CGNAT) lets an internet provider share one public IPv4 address between many customers. It's common on mobile networks and increasingly on home broadband, because public IPv4 addresses are scarce. Your router or phone gets an address from a shared range (often 100.64.0.0/10, reserved for this purpose in RFC 6598), and the provider's equipment translates it to a public address.
Why WireGuard Runs Into Trouble
Hosting at home: a WireGuard server listens on a UDP port. Behind CGNAT you can't forward that port, because you don't control the public address, so incoming connections never reach you. Idle timeouts: NAT devices forget UDP mappings that go quiet. If neither side sends anything for a while, the mapping disappears and the next packets from the server are dropped until your side sends again. Peer-to-peer between two NATed devices: WireGuard itself doesn't do NAT traversal. Tools built on top of it may try "hole punching", which often fails when one side is behind a strict (symmetric) NAT that changes the external port for each destination. Networks that restrict UDP: some networks limit or block UDP traffic, and WireGuard uses only UDP.
Common Setup Mistakes
Check whether you're behind CGNAT. Compare the WAN address shown in your router with the address on our what is my IP page. If they differ, or the router shows an address starting with 100.64 to 100.127, you're behind CGNAT. For hosting at home: request a public IPv4 address from your ISP (some offer this, sometimes for a fee), use IPv6 if both ends support it, or run the server on a small machine with a public IP that relays to your home. For a phone connecting to a VPN service: enable keepalives if you configure WireGuard yourself. If the network restricts UDP or slows down VPN traffic, use a protocol that works differently.
What Actually Helps
Check whether you're behind CGNAT. Compare the WAN address shown in your router with the address on our what is my IP page. If they differ, or the router shows an address starting with 100.64 to 100.127, you're behind CGNAT. For hosting at home: request a public IPv4 address from your ISP (some offer this, sometimes for a fee), use IPv6 if both ends support it, or run the server on a small machine with a public IP that relays to your home. For a phone connecting to a VPN service: enable keepalives if you configure WireGuard yourself. If the network restricts UDP or slows down VPN traffic, use a protocol that works differently.
Where Other Protocols Fit
Cap VPN offers three protocols, so you can switch if one doesn't suit a network:
FAQ
Yes, as a client connecting out to a server with a public address, which is how VPN services work. Hosting a WireGuard server behind CGNAT needs IPv6, a public IPv4 address from your ISP, or a relay.
Stay Private Online
CapVPN encrypts your connection, hides your IP, and keeps your browsing history private. Try it free with unlimited access.
Get CapVPN Free