Study guide
3.1 Source, Destination, and Twice-NAT Policy Configurations
Palo Alto Networks Certified Next-Generation Firewall Engineer Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Device Deployment & Architecture
1.1 Platform Selection & Sizing: Hardware, VM-Series, and Cloud NGFW Form Factors 1.2 Base PAN-OS 11.x System Settings, Management Interfaces, and Service Routes 1.3 Interface Types, Zone Topologies, and Virtual Wire Configurations 1.4 Site-to-Site VPN Tunnels: IPSec, GRE, and Quantum-Resistant Cryptography
2 Chapter 2: Routing, VRFs, and Virtual Routers
2.1 Virtual Routers and VRF Architecture in PAN-OS 11.x 2.2 Static Routing, BGP, and OSPF Configuration & Failover 2.3 Policy-Based Forwarding (PBF) and Path Monitoring
3 Chapter 3: NAT and High Availability Designs
3.1 Source, Destination, and Twice-NAT Policy Configurations 3.2 High Availability Active/Passive Architecture and State Synchronization 3.3 High Availability Active/Active Architecture and HA Clustering
4 Chapter 4: Panorama Management & Policy Hierarchy
4.1 Panorama Architecture: Collector Groups, Log Collectors, and Device Registration 4.2 Templates and Template Stacks Configuration 4.3 Device Groups, Shared Rulestacks, and Policy Hierarchy
5 Chapter 5: Strata Cloud Manager and AIOps
5.1 Strata Cloud Manager (SCM) Architecture and Cloud-Delivered Management 5.2 SCM Rulestacks, Folder Hierarchies, and Unified Policy Management 5.3 AIOps for NGFW: Telemetry, Proactive Best-Practice Audits, and Operational Insights
6 Chapter 6: Security Profiles and Content Inspection
6.1 Antivirus, Anti-Spyware, and DNS Security Profiles 6.2 Vulnerability Protection, Custom Signatures, and Threat Exceptions 6.3 URL Filtering, Advanced WildFire Analysis, and Inline Deep Learning
7 Chapter 7: Decryption Inspection & Policy
7.1 SSL Forward Proxy Architecture and Internal Certificate Authority Trust 7.2 SSL Inbound Inspection for Internal Web Servers 7.3 Decryption Exclusions, HSM Integration, and Troubleshooting Decryption Failures
8 Chapter 8: User Identity and GlobalProtect Remote Access
8.1 User-ID Architecture, Agentless/Agent Deployment, and Cloud Identity Engine (CIE) 8.2 GlobalProtect Portals, Gateways, and Authentication Methods (SAML, MFA) 8.3 Host Information Profile (HIP) Checks and Endpoint Security Enforcement
9 Chapter 9: Cloud NGFW, Automation, and API Integration
9.1 Cloud NGFW for AWS and Azure Architectures (GWLB and VWAN) 9.2 XML and REST API Automation with Palo Alto Networks Firewalls 9.3 Infrastructure as Code: Terraform and Ansible Automation for PAN-OS 9.4 CN-Series, AI Runtime Security, and Edge Deployment Options
10 Chapter 10: Virtual Systems, Logging, and Operational Monitoring
10.1 Virtual Systems (VSYS), Logical Routers, and Inter-VSYS Routing 10.2 Logging Architecture: Strata Logging Service, Log Forwarding, and Collectors 10.3 Application Command Center (ACC), Dashboards, and Custom Reporting 10.4 Explicit and Transparent Web Proxy on PAN-OS
3.1 Source, Destination, and Twice-NAT Policy Configurations
Key Takeaways Explain This Topic AI
Source NAT translates the egress source IP and/or port, supporting Static IP (1:1), Dynamic IP (pool allocation without port overload), and Dynamic IP and Port (DIPP port oversubscription up to 64,000 sessions per IP).
Destination NAT translates incoming destination IPs and ports for internal servers, utilizing Virtual IPs or port forwarding, while requiring security policies to match the pre-NAT destination zone and post-NAT destination IP.
Twice-NAT simultaneously translates both source and destination header fields within a single rule, preventing asymmetric routing and IP conflicts in overlapping subnet or B2B interconnect scenarios.
PAN-OS NAT rules execute top-to-bottom based on a strict first-match evaluation model, independently of Security Policy enforcement.
During packet processing, Security Policy lookups evaluate the original source zone, original source IP, destination zone based on pre-NAT routing, and post-NAT destination IP address.
Last updated: July 2026
3.1 Source, Destination, and Twice-NAT Policy Configurations
Network Address Translation (NAT) in Palo Alto Networks PAN-OS is fundamentally decoupled from Security Policy enforcement. While security policies dictate whether traffic is allowed or denied, NAT policies determine if and how packet IP addresses and transport-layer port numbers are translated as packets traverse the firewall. PAN-OS operates a stateful NAT engine that automatically creates matching translation entries for return flow traffic, ensuring bidirectional communication without requiring explicit return NAT rules.
Understanding the precise mechanics of Source NAT , Destination NAT , Twice-NAT , and the underlying lookup architecture is vital for network security engineers configuring Next-Generation Firewalls (NGFWs) in complex enterprise environments.
Source Network Address Translation (Source NAT)
Source NAT (SNAT) modifies the source IP address and/or source port of outbound packets. It is primarily deployed when internal hosts with private RFC 1918 addresses require access to external networks such as the Internet or public clouds.
PAN-OS supports three distinct Source NAT translation types:
1. Dynamic IP and Port (DIPP)
Dynamic IP and Port (DIPP) , commonly referred to as Port Address Translation (PAT) or port overload, allows multiple internal private IP addresses to share one or more public IP addresses by translating both source IP addresses and source port numbers.
Port Oversubscription : PAN-OS assigns a unique source port for each concurrent outbound session. A single public IP address can theoretically support up to 64,000 concurrent sessions per protocol (TCP, UDP).
Interface Fallback : DIPP rules can be bound directly to an egress interface IP address, ensuring automatic translation even when dynamic public WAN IPs change via DHCP.
DIPP Pool Oversubscription & Allocation : If the primary DIPP pool reaches port capacity, PAN-OS can allocate secondary IP addresses from a configured pool. If port exhaustion occurs, new outbound sessions are dropped.
Use Case : General user outbound Internet access.
2. Dynamic IP (DIP)
Dynamic IP (DIP) translates an internal source IP address to a public source IP address selected from a pool of addresses without translating transport layer ports (1-to-1 dynamic binding).
Address Pool Allocation : When an internal host initiates a session, PAN-OS assigns an unused IP address from the designated translation pool to that internal host for the duration of its sessions.
Session Limit & Reserve IP : If all public IPs in the DIP pool are actively assigned, subsequent new internal hosts attempting to initiate traffic will be blocked unless a fallback DIPP pool is configured.
Use Case : Legacy applications or strict security protocols (such as certain VoIP or database connections) that reject transport port translation.
3. Static IP NAT
Static IP NAT establishes a permanent, fixed 1-to-1 mapping between a single private internal IP address and a single public external IP address.
Bidirectional NAT : When configured with the Bi-directional checkbox enabled, PAN-OS automatically creates a implicit Destination NAT rule for inbound traffic originating from external networks targeted at the public IP address, routing it to the private IP address.
Use Case : Publicly accessible servers (e.g., mail servers, web servers) requiring predictable outbound IP identity.
Destination Network Address Translation (Destination NAT)
Destination NAT (DNAT) modifies the destination IP address and optionally the destination port of inbound packets. DNAT allows external clients on public networks to reach internal servers hosted behind private IP subnets.
Virtual IP (VIP) and Port Forwarding
Static Destination NAT : Maps a public destination IP to a private internal server IP address without changing the port.
Port Forwarding (Service Translation) : Translates both the public destination IP address and the destination port number (e.g., translating public IP 203.0.113.50:8443 to internal server 10.0.1.50:443 ). This permits hosting multiple distinct internal services behind a single public IP address.
Dynamic Destination NAT : Translates a single public IP or range to a pool of internal destination IP addresses, often used for basic destination load balancing across internal application targets.
Twice-NAT (Bi-Directional Dual Translation)
Twice-NAT occurs when a single NAT policy rule translates both the Source IP/Port AND the Destination IP/Port of a packet simultaneously. [Client: 192.168.10.50] ----> (Firewall Twice-NAT) ----> [Server: 10.200.1.100]
- Src: 192.168.10.50 Src NAT: 172.16.1.50 (Translates Client IP)
- Dst: 192.168.10.100 Dst NAT: 10.200.1.100 (Translates Virtual Dst IP)
Primary Use Cases for Twice-NAT:
Overlapping IP Subnets : When two merging enterprise networks or B2B IPsec VPN partners share identical RFC 1918 address spaces (e.g., both sides use 192.168.1.0/24 ), Twice-NAT translates the local source IP to a virtual pool AND translates the destination IP to a target virtual pool, resolving routing ambiguity.
Enforcing Symmetric Return Paths : In environments where an internal server does not use the Palo Alto firewall as its default gateway, translating the incoming external client source IP to an internal firewall-facing IP address forces the server to send return packets back to the firewall, preventing asymmetric routing.
NAT Rule Matching Order
PAN-OS evaluates NAT policy rules using a strict top-to-bottom, first-match algorithm :
The firewall compares incoming packet headers against NAT rules in sequential order.
As soon as a packet matches all criteria of a NAT rule, PAN-OS applies that rule and stops evaluating further NAT rules.
If no NAT rule matches, the packet passes through untranslated.
Translation vs. Security Policy Zone and IP Evaluation
A critical area of confusion on the PAN-NGFW Engineer exam is how Security Policies interact with NAT rules. PAN-OS enforces a strict separation between NAT lookup and Security Policy lookup.
When a packet arrives at the firewall, PAN-OS performs NAT and Security policy evaluations using specific combinations of original (pre-NAT) and translated (post-NAT) attributes:
NAT Policy Match Criteria :
- Original Source Zone
- Original Destination Zone (determined by performing a route lookup on the original pre-NAT destination IP )
- Original Source IP
- Original Destination IP
Security Policy Match Criteria :
- Original Source Zone
- Original Source IP
Destination Zone : The egress zone determined by a route lookup of the pre-NAT destination IP address.
Destination IP : The Post-NAT (Translated) Destination IP address!
Key Exam Rule : In Security Policy rules for Destination NAT traffic, the Destination Zone is the zone where the pre-NAT destination IP routes, but the Destination IP address MUST be configured as the Post-NAT (real internal) IP address .
NAT Translation Method Comparison
NAT Type Source Translation Destination Translation Port Translation Primary Target Use Case
DIPP (Source NAT) Private IP → \rightarrow → Public IP Pool None Yes (Source Port Overload) General User Outbound Internet
Dynamic IP (DIP) Private IP → \rightarrow → Public IP Pool None No (1-to-1 Dynamic Allocation) Protocols rejecting port translation
Static IP (SNAT) Private IP → \rightarrow → Fixed Public IP Optional (Bi-directional) No Outbound Server Identity
Destination NAT None Public IP → \rightarrow → Private IP Optional (Port Forwarding) Inbound Server Publishing
Twice-NAT Local IP → \rightarrow → Virtual IP External IP → \rightarrow → Target IP Optional Overlapping Subnets & B2B VPNs