Skip to content
CyberEd DZ

NAT and Gateways

In brief

How many devices share one public address through NAT, and what a gateway does.

Objectives

  • Explain NAT in one sentence
  • Describe the gateway's job
  • Explain NAT's firewall side-effect

Your home has one public IP address but many devices. NAT (Network Address Translation) is the trick that lets them share it: your router rewrites the private source address on the way out and remembers the mapping so replies come back to the right device.

The gateway is the router that traffic goes through to leave the local network. When a packet is not for the local subnet, it is sent to the gateway, which forwards it onward.

Note

NAT is why you cannot usually connect to a home device from outside — there is no public address for it. This is a side-effect that happens to provide a crude firewall.

Recap

  • NAT rewrites private addresses to share one public IP
  • The gateway forwards traffic off the local network
  • NAT incidentally blocks unsolicited inbound connections