Port Forwarding
Port forwarding (also called port mapping) is a technique used by routers and firewalls implementing NAT to redirect communication requests from one address and port number combination to another. It is the mechanism by which a device behind a NAT — a home server, a gaming console, a security camera — can receive unsolicited inbound connections from the public internet, despite the fact that NAT normally blocks all such connections by default.
The technique works by configuring the NAT device to maintain a static mapping: packets arriving at the public IP address on a specific port are rewritten to target the private IP address and port of the internal device. For example, a router might be configured to forward all TCP traffic on public port 8080 to internal host 192.168.1.50 on port 80. The NAT device rewrites both the destination IP address and port before forwarding the packet to the internal network.
Port forwarding is simple in concept but complex in practice. It requires the user to know the internal IP address of the target device, which may change if the local network uses DHCP. It exposes the internal device directly to the public internet, bypassing the security boundary that NAT provides. And it conflicts with the increasingly common deployment of carrier-grade NAT, where the ISP itself performs multiple layers of address translation, making port forwarding impossible without ISP cooperation.
Port forwarding is a symptom of a deeper architectural failure: the internet was designed for end-to-end connectivity, but NAT broke that design, and port forwarding is the duct tape that patches it back together. It is not a feature; it is a workaround. The fact that millions of users must manually configure port forwarding rules — or use fragile UPnP protocols that open security holes — is evidence that the internet's address architecture has failed to evolve with its usage patterns. IPv6, which restores end-to-end addressing, would eliminate the need for port forwarding entirely. That it has not been widely adopted is a testament to the inertia of deployed infrastructure.