NAT versus firewall policy
Translation is not a permission rule
A translator answers which address or port should replace another. A firewall answers whether traffic may pass. They often share a device and connection state, but they solve different problems. A route, allowed policy, valid translation when needed, a listening application and a viable reply path are separate prerequisites. Private addresses and NAT do not replace authentication or a security policy.
Evaluate a fictional service policy
The following paper model uses a pre-existing destination mapping for a fictional service. The policy is explicitly evaluated against the translated destination; actual products may inspect different tuples at different processing stages. Only an approved training client is permitted. No service is exposed or configured in this lesson. In case C, a mapping and permission exist but the server has no listening process.
Mapping: TCP 192.0.2.9:8443 -> 10.0.0.50:443Policy: allow TCP from 203.0.113.10 to 10.0.0.50:443; deny other new flowsA: 203.0.113.10, route=yes, listening=yes, return=yes -> possibleB: 203.0.113.11, route=yes, listening=yes, return=yes -> deniedC: 203.0.113.10, route=yes, listening=no, return=yes -> no serviceTwo translations and hairpin paths
Carrier-grade NAT (CGNAT) lets a provider share IPv4 addresses among subscribers. RFC 6598 reserves 100.64.0.0/10 as shared address space, distinct from RFC 1918 private space. A home router and a provider translator can both rewrite one flow. An inbound mapping at home does not establish a matching provider mapping. A hairpin flow is different: an internal client addresses another internal endpoint through its external mapping, and the translator directs the traffic back inside. Support, source rewriting and return paths matter. Neither behavior establishes authorization.
Diagnose by evidence, not by opening access
For an authorized lab flow, compare the original and translated endpoints in recorded tables, check the intended policy decision, verify both routes, then inspect the application listener. Missing state, pool exhaustion, an explicit deny and a stopped service require different fixes. Keep policy unchanged while gathering evidence; request approved changes only after locating the failure. A timeout does not uniquely identify NAT failure. For logging, note protocol, both endpoint pairs and timestamp; protect any real user identifiers.
Practice the return path
Change case A so the reply route is absent. Permission still exists, but the modeled exchange fails. Explain why adding another mapping cannot repair a missing route. References: RFC 3022, RFC 4787 and RFC 6598. Next: IPv6 transition.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
NAT versus firewall policy — knowledge check
Apply concepts to fictional translation and migration scenarios.
Case B has a destination mapping and a listening service. Why does it fail?
Which prefix is reserved for shared address space?
Case A loses its return route. What is the result?
What does a hairpin flow use?
Case C has a mapping and permission. What additional problem is recorded?