Networking · 12 · 3 min read

NAT

The trick that lets a whole home share one public IP address.

How it works

  1. 1Your laptop (192.168.1.23) sends a request to a website.
  2. 2The router swaps the private source address for its public one and notes a port number.
  3. 3The website answers the router’s public address.
  4. 4The router looks at its table and forwards the answer to your laptop.

Side effects

Devices behind NAT can’t be reached from outside unless you set up port forwarding. That accidentally protects home devices — but it is not a real firewall.