Networking – Set up a web server behind a Carrier Grade NAT

nat;networkingport-forwarding

I was trying to set up a small home server.

I use dynamic IP adress. My router's wan adress is like this 100.70.81.xxx and my public ip is 81.213.177.xx

I made port forwarding in my router. www, smtp and pop3 ports are open. But still my server is not accessible from public internet I think.

So should my computer be behind a Carrier Grade NAT. If this is the case is it still possible to set up a web server behind a CGN?

Best Answer

Your router's "WAN" address is from the private 100.64.0.0/10 range (which is kinda like 192.168.x, but dedicated specifically to CGNAT). So that means you're behind CGN and the global address you're seeing is shared between multiple customers.

So the only ways to set up a server behind a NAT you don't control are:

  • Make the ISP do port-forwarding... yeah, that's not gonna happen. (Even though in theory NAT-PMP was supposed to permit that.)

  • Obtain your own global address from somewhere else, for example there are VPN providers which support server hosting and can give you a static address.

  • If you have IPv6, that would be globally reachable, though you'd additionally need a service which can proxy connections from IPv4-speaking clients to your IPv6-only server (e.g. CloudFlare might do the job).

(IPFS also comes to mind as option 3¾ – recently I've seen a few static-page websites hosted via "web-to-IPFS" proxy servers. From the outside it looks like a completely normal domain which is aliased to gateway.ipfs.io.)

Related Question