Security · 4 min read

Palo Alto NAT Rule Order and Overlapping Addresses

Network Address Translation (NAT) on Palo Alto Networks firewalls requires careful planning around rule order and overlapping address spaces. Unlike some platforms, Palo Alto processes NAT rules in a specific sequence, and understanding this behavior is critical both for the PCNSA certification exam and for avoiding connectivity issues in production. This guide covers how the firewall evaluates NAT rules, why rule order matters, and how to handle scenarios where translated addresses overlap.

How Palo Alto Evaluates NAT Rules

Palo Alto Networks firewalls evaluate NAT rules in top-to-bottom order, similar to access control lists. The firewall stops at the first rule that matches the traffic flow and applies that rule's translation. If no rule matches, the traffic is not translated (unless you have a default NAT policy). This means rule placement directly affects which translation is applied to a given source or destination address.

NAT rules are checked before the security policy, so the firewall translates addresses first, then evaluates the security policy against the translated addresses. This ordering is important: a security policy rule may permit or deny traffic based on the translated IP, not the original.

Rule Order and Specificity

Best practice is to order NAT rules from most specific to least specific. A more specific rule (narrower source or destination range) should appear above a more general rule (broader range) to ensure the correct translation is applied.

Example: if you have a rule translating 10.0.0.0 divided by 24 to 203.0.113.0 divided by 25, and another rule translating 10.0.0.0 divided by 8 to 203.0.113.128 divided by 25, the first rule must appear above the second. Otherwise, traffic from 10.0.1.0 divided by 24 would match the second rule and receive the wrong translation.

Overlapping Address Spaces and Conflicts

Overlapping NAT translations occur when two rules translate traffic to the same external address range or when internal address ranges overlap. The firewall does not prevent you from creating overlapping rules; it simply applies the first matching rule. This can cause unexpected behavior or make debugging difficult.

To avoid overlap, maintain a clear IP address plan. Document which internal ranges map to which external ranges, and verify that no two rules translate to the same external address space. Use non-overlapping subnets for internal networks, or use port-based PAT to multiplex multiple internal addresses onto a single external IP.

Testing and Validation

Validate your NAT configuration by reviewing the rule order in the Palo Alto GUI or CLI, then test with actual or simulated traffic. Use the packet tracer tool in the firewall to trace how a specific source and destination pair is translated.

admin@firewall> show nat rule all
Admin@firewall> debug dataplane packet-diag drop all
Admin@firewall> show session all filter source 10.0.1.5

These commands help you verify that the correct NAT rule is being applied. The session table shows active translations and confirms which rule is in use. For the PCNSA exam, be prepared to analyze rule order scenarios and identify which rule would match a given traffic flow.

IP-in-Subnet & Overlap
Quickly verify address ranges and detect overlapping subnets in your NAT design
Open →
Practise this on today’s Daily Ops Drill — a free network task every day.
Open the app →
Free tools for this
More from the blog
FortiGate: Web Filter + SSL Inspection = BypassRead →Juniper VLAN Range in Filter: Expansion and Matching OrderRead →