Roman Dmytriv
← All writing Reference · PAN-OS

Every Palo Alto NAT type, and the ASA construct it maps from

"NAT" on PAN-OS is several distinct types, each with its own behavior and its own Cisco ASA equivalent. The full reference, with diagrams, source, destination, combined, U-turn, bidirectional, and no-NAT.

Roman Dmytriv~11 minASA → PAN-OS

"NAT" on a Palo Alto firewall isn't one thing. There are several distinct translation types, each with a specific job, its own matching behavior, and, if you're coming from a Cisco ASA, a specific ASA construct it corresponds to. Get them straight and your design is clean. Blur them together and you'll build a firewall that exhausts port pools, breaks return traffic, or silently drops the sessions you cared about. This is the full reference, with the ASA mapping alongside each type.

First principle: NAT policy runs on the original packet

Before the types, the model, because every one of them depends on it. PAN-OS matches NAT policy against the original, pre-translation packet, and it does so at a specific point in the packet's journey through the firewall.

1 Ingress & packet parse 2 Forwarding lookup on original destination sets the egress zone 3 NAT policy match on the ORIGINAL packet 4 Security policy check pre-NAT address, post-NAT zone 5 NAT translation applied the rewrite happens here 6 Egress

NAT is matched on the original packet (step 3) and evaluated before security policy, but the actual translation isn't applied until step 5.

Two consequences fall out of this order and account for most NAT confusion:

Coming from ASA

On ASA 8.3+ you're already used to ACLs referencing the real (pre-NAT) address rather than the mapped one, so the pre-NAT matching idea carries over. What's new is the zone half: ASA reasoned about nameif interfaces; PAN-OS reasons about zones derived from a route lookup on the translated destination. Same "use the real IP" instinct, different destination-side logic.

Source NAT

Source NAT rewrites the source address of a session. It's what lets private hosts reach the internet, and PAN-OS offers three flavors that trade off address economy against session fidelity.

Dynamic IP and Port (DIPP)

The workhorse. DIPP maps many internal hosts onto one (or a few) translated addresses by multiplexing on port. This is PAT / "overload" in Cisco terms. Each internal session gets the shared public address and a unique source port, so thousands of hosts can share a single IP.

10.1.1.10 10.1.1.11 10.1.1.12 Firewall DIPP 203.0.113.1 :40001 :40002 :40003

DIPP: many internal sources collapse onto one public address, distinguished by translated source port.

The translated address can be the egress interface's address (interface address) or an explicit IP/range. Port capacity is finite (roughly 64k per translated IP) and PAN-OS can oversubscribe (reusing the same port toward different destinations, at a configurable ratio up to 8x). On high-traffic edges, DIPP port exhaustion is a real failure mode: when the pool is spent, new sessions fail. Size the translated pool and watch the oversubscription ratio.

Cisco ASA — dynamic PAT
object network INSIDE_NET
 subnet 10.1.1.0 255.255.255.0
 nat (inside,outside) dynamic interface
PAN-OS — DIPP
set rulebase nat rules Outbound \
 from trust to untrust source 10.1.1.0/24 \
 source-translation dynamic-ip-and-port \
 interface-address interface ethernet1/1

The oversubscription ratio is a PAN-OS-only tuning knob, no ASA analogue.

Dynamic IP (DIP)

DIP is a one-to-one dynamic mapping with no port translation: each internal host draws a distinct translated address from a pool for the life of its sessions. Because ports are untouched, it suits protocols that break under PAT. The catch is arithmetic: the pool must hold at least as many addresses as there are concurrent internal hosts, or hosts beyond the pool size can't translate.

Cisco ASA — dynamic NAT (pool)
object network NAT_POOL
 range 203.0.113.20 203.0.113.40
object network INSIDE_NET
 subnet 10.1.1.0 255.255.255.0
 nat (inside,outside) dynamic NAT_POOL
PAN-OS — Dynamic IP
set rulebase nat rules Outbound-DIP \
 from trust to untrust source 10.1.1.0/24 \
 source-translation dynamic-ip \
 translated-address 203.0.113.20-203.0.113.40

No port translation; the pool must be at least as large as the concurrent host count.

Static IP

A fixed, persistent one-to-one mapping. A given internal address always translates to the same external address, ports preserved. It can operate on whole subnets, translating the network portion while preserving host bits (a static subnet-to-subnet mapping). Static source NAT also carries an important option (bidirectional) covered below.

Cisco ASA — static source NAT
object network HOST_A
 host 10.1.1.50
 nat (inside,outside) static 203.0.113.50
PAN-OS — static IP
set rulebase nat rules Static-A \
 from trust to untrust source 10.1.1.50 \
 source-translation static-ip \
 translated-address 203.0.113.50

ASA statics were inherently bidirectional; in PAN-OS that reverse is an explicit option (see below), don't assume it.

Destination NAT

Destination NAT rewrites the destination address, the mechanism for publishing an internal service on a public address.

Static destination NAT (and port forwarding)

Traffic to a public address is rewritten to a private one. Optionally the port is translated too (port forwarding) so public TCP/8080 can land on internal TCP/80. Recall the zone subtlety from the packet-flow model: the security rule that permits this traffic uses the public (pre-NAT) address but the internal (post-NAT) zone.

Client Internet dst 203.0.113.10 Firewall dst 10.1.1.100 Web server 10.1.1.100

Static destination NAT: the public address is rewritten to the internal server; the security rule still matches the public address.

Cisco ASA — static dst NAT + port fwd
object network WEB_SRV
 host 10.1.1.100
 nat (inside,outside) static interface \
   service tcp 8080 80
! permits to the real IP (8.3+)
access-list OUT permit tcp any object WEB_SRV eq www
PAN-OS — dst NAT + security rule
set rulebase nat rules Web-In from untrust to untrust \
 destination 203.0.113.10 service tcp-8080 \
 destination-translation translated-address 10.1.1.100 \
 translated-port 80
# security: pre-NAT addr, post-NAT zone
set rulebase security rules Allow-Web from untrust to trust \
 destination 203.0.113.10 application web-browsing

Note the security rule matches the public (pre-NAT) address but the internal (post-NAT) zone.

Dynamic destination NAT

Newer than the rest, dynamic destination NAT translates the destination to an address drawn from a set (an address group or a dynamic address object) and can distribute sessions across several servers using methods like round-robin, IP hash, or least-sessions. It's crude compared to a real load balancer, but useful for basic distribution or for pointing at a membership that changes dynamically.

Coming from ASA

No clean ASA equivalent, the ASA didn't do destination-side session distribution this way. If you're migrating and you find inbound traffic that was load-balanced by some other box, this is the PAN-OS-native feature to consider, not a like-for-like conversion.

Combined source + destination NAT

A single PAN-OS NAT rule can translate both source and destination at once, rewrite where a packet is going and where it appears to come from in one pass. This is common for inbound flows where you also want to force symmetric return through the firewall, and for the U-turn case below.

Cisco ASA — twice / manual NAT
nat (inside,outside) source dynamic INSIDE PAT_IP \
  destination static DMZ_PUB DMZ_REAL
PAN-OS — combined NAT rule
set rulebase nat rules Both from trust to dmz \
 source 10.1.1.0/24 destination 203.0.113.60 \
 source-translation dynamic-ip-and-port interface-address \
   interface ethernet1/2 \
 destination-translation translated-address 10.2.2.60

These twice-NAT rules are the ones whose ordering you must preserve most carefully when flattening into the single PAN-OS list.

U-turn (hairpin) NAT

The case that confuses everyone: an internal client reaching an internal server by its public address. The client resolves the public IP, sends traffic toward the firewall, and the firewall has to "u-turn" it back inside, translating the destination to the private server and, crucially, the source as well, so the server's replies return through the firewall instead of going direct and breaking the session.

Firewall src + dst NAT Internal client 10.1.1.50 Internal server 10.1.1.100 dst 203.0.113.10 dst 10.1.1.100

U-turn NAT: traffic goes up to the firewall addressed to the public IP and comes back down to the internal server. Source NAT is applied too, so return traffic stays symmetric.

Cisco ASA — hairpin
same-security-traffic permit intra-interface
object network WEB_SRV
 host 10.1.1.100
 nat (inside,inside) static interface
PAN-OS — U-turn (combined)
set rulebase nat rules U-Turn from trust to untrust \
 source 10.1.1.0/24 destination 203.0.113.10 \
 source-translation dynamic-ip-and-port interface-address \
   interface ethernet1/2 \
 destination-translation translated-address 10.1.1.100

No intra-interface toggle in PAN-OS, the zone model handles it, but the source-NAT half is just as mandatory as it was on ASA.

Bidirectional static NAT

On a static source NAT rule, the bidirectional option tells PAN-OS to automatically create the implied reverse destination-NAT, so the mapping works for sessions initiated from either side without you writing a second rule. It's a convenience, and a trap: it silently generates policy. Enable it only when you actually want the internal host reachable from outside, and remember that an inbound security rule is still required, bidirectional NAT creates the translation, not the permission.

Coming from ASA

This is the reverse direction ASA gave you for free with a static. The behavior you took for granted on ASA is the thing you have to consciously switch on in PAN-OS, a frequent source of "the outbound works but inbound doesn't" after a migration.

No-NAT rules

Sometimes the correct translation is none, traffic that must bypass a broader NAT rule, classically site-to-site VPN traffic that has to keep its real addresses. In PAN-OS you write an explicit NAT rule with no translation, placed above the broader rule it exempts, since NAT is first-match top-down.

Cisco ASA — identity NAT / exempt
nat (inside,outside) source static LOCAL LOCAL \
  destination static REMOTE REMOTE \
  no-proxy-arp route-lookup
PAN-OS — no-NAT (placed on top)
set rulebase nat rules No-NAT-VPN from trust to untrust \
 source 10.1.1.0/24 destination 10.99.0.0/16 \
 source-translation none
# must sit ABOVE the general outbound DIPP rule

If a no-NAT rule lands below the general PAT rule, VPN traffic gets translated and the tunnel breaks.

Getting it right on a migration

Pulling it together, the rules that keep a converted NAT policy faithful:

None of the PAN-OS NAT types is complicated on its own. The trouble is always in the seams, the evaluation order, the reverse rule that used to be automatic, the security rule reaching for the wrong zone. Know which type maps to which ASA construct, respect the first-match ordering, and NAT stops being the part of the migration that pages you at 2 a.m.

Written by Roman Dmytriv, network security engineer (CISSP), two decades securing and modernizing enterprise networks. More writing at blog.dmytriv.com, and I'm on LinkedIn.