NAT

1 / 10

The container has an address, a route, and no way to reach anything beyond the host. Its 10.0.0.2 is a private address from RFC 1918 — the packet gets out, and the reply has nowhere to come back to.

Network Address Translation fixes that by having the host rewrite the packet's source address to its own on the way out, remember the substitution, and undo it on the way back. Three iptables rules.

Finish →