Octet

Is NAT a security feature?

Show the answer

Say this first

Not really. PAT has a side effect that looks like security: an unsolicited inbound packet matches no translation, so it gets dropped. But NAT does no inspection, a static mapping exposes the host completely, and anything an inside host connects to can talk back over that connection. The security comes from a stateful firewall, which does the "replies only" job on purpose and with a policy. On IPv6, where there is usually no NAT, the firewall is all you have.

Go deeper

What NAT is for

Address conservation: RFC 1918 space inside and PAT at the edge. Hiding the internal addressing is a minor bonus, not a control.

What it costs

  • It breaks end-to-end addressing, which is why ALGs and NAT traversal exist.
  • It makes attribution harder. To know which inside host made a connection at a given time you need translation logs. Carriers running CGNAT keep them for legal requests.
  • It complicates troubleshooting: the same flow has different addresses on each side of the box.

The interview answer

Security comes from a stateful firewall policy: default deny inbound, explicit permits for published services, inspection where needed. NAT runs alongside it.

Traps

  • Telling an interviewer NAT is your firewall.
How did you do?Book 3.3 Internet (IP)Book 8.5 Example Systems