I am trying to access the server from the public ip. for that I have enabled port forwarding on the tp-link router for port 8069.
My pubic is is 123.201.xx.xx
When I try to access my public address with port number, it gives me no response.
I have checked forum to resolve the issue. and get to know that my public ip and wan ip is different. i tried to access the server with the wan address and it allows me to access the server locally, not publicly.
my wan address is 100.66.xx.xxx.
what additional configuration i need to do to access server publicly? why my wan address and public ip is different?
Best Answer
The WAN address you have is in the range reserved for CGN (Carrier-Grade NAT, RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space). This range is
100.64.0.0/10
, and it means your ISP is assigning you what is essentially a private address, and it is doing NAT also. Most ISPs don't even use this range assigned by IANA for this, they just use regular RFC 1918 address space. Your port forwarding doesn't work because you are not forwarding on the ISP's NAT, and the ISP will not port forward for you since that would prevent all its other customers on that NAT from being able to use that port.The RIRs have run out of IPv4 addresses to assign to the ISPs, so the ISPs are turning to CGN to assign non-public IPv4 addresses to residential customers, saving their precious pool of public IP addresses for business customers willing to pay a premium for public IPv4 addresses.
Most residential ISPs have clauses in their customer agreements which prohibit you from running a server from the residential network to the Internet, so they don't really care if CGN prevents this for residential customers.
From the RFC:
The RFC also lists some of the problems caused by CGN: