Protocol Lab Tutorial Explains Destination NAT and Port Forwarding in Container Lab
A new hands-on networking tutorial from the Protocol Lab series explains how destination NAT (DNAT), commonly known as port forwarding, allows external clients to reach internal services through a single public IP address and port. The lab demonstrates a three-node setup where a gateway maps public address 203.0.113.1:8080 to an internal server at 10.0.0.2:80, keeping the private IP hidden from the client. DNAT rules are applied in the PREROUTING stage so traffic is redirected before the kernel makes routing decisions, while conntrack handles un-NATing the server's reply so responses appear to originate from the public address. The tutorial is the inbound counterpart to Lab 20, which covered source NAT, and is designed to run entirely in a local containerlab environment using Docker and documentation-only address space. It also previews how DNAT concepts connect to L4 load balancing and firewall policy in later labs in the series.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in