Post

Palo Alto Packet Flow

Palo Alto Packet Flow

Understanding Palo Alto Firewall Packet Flow

Understanding how a Palo Alto Networks firewall processes packets is essential for troubleshooting connectivity, NAT, and security policy issues.

PAN-OS uses stateful inspection and two primary processing paths: Slow Path and Fast Path.

Packet Flow Overview

1. Ingress Processing

The packet arrives at a firewall interface. The firewall:

  • Examines Layer 2, Layer 3, and Layer 4 headers.
  • Determines the ingress interface and source security zone.
  • Validates packet integrity.
  • Performs tunnel decapsulation and IP fragment reassembly, if applicable.

Malformed or invalid packets may be dropped at this stage.

2. Session Lookup

The firewall checks its session table using six identifying values (6-tuple):

  • Source IP address
  • Destination IP address
  • Source port
  • Destination port
  • IP protocol
  • Source security zone

The result determines which processing path the packet takes:

  • Slow Path: No existing session is found; session setup is required.
  • Fast Path: An existing session is found; the firewall uses previously established session information.

Slow Path — Session Setup

3. Zone Protection and TCP State Checks

The firewall evaluates applicable Zone Protection settings and validates the initial TCP packet. By default, a new TCP session must begin with a SYN packet.

4. Forwarding and Route Lookup

The firewall determines the initial forwarding path, including the egress interface and destination security zone.

5. NAT Policy Lookup

NAT rules are evaluated from top to bottom, with the first matching rule selected.

If Destination NAT (DNAT) is required, the firewall performs a second route lookup using the translated destination IP address.

NAT policy selection occurs before security policy evaluation.

6. User-ID and DoS Protection

The firewall retrieves available user and group information associated with the source IP address and evaluates applicable DoS Protection policies.

7. Security Policy Evaluation

The firewall performs an initial security policy lookup before the application is fully identified.

When NAT is involved, security policies reference:

  • Original (pre-NAT) source and destination IP addresses.
  • Resulting (post-NAT) destination security zone.

Traffic denied by policy is dropped.

8. Session Creation

If the preceding checks succeed, the firewall creates a session containing the forwarding, policy, and NAT information.

Both directions of the connection are installed in the session table. The packet then enters the Fast Path.

Fast Path — Session Processing

9. Session Processing and NAT

The firewall uses the existing session information to process packets efficiently, including:

  • Session state and timeout management.
  • IP address and port translation.
  • TCP validation and stream reassembly.

10. App-ID and Decryption

App-ID identifies the application as traffic becomes available for inspection.

The firewall reevaluates security policy when the application is identified or changes. Encrypted traffic may also be decrypted according to the configured decryption policy.

11. Content Inspection

When applicable, the firewall inspects traffic using Content-ID and configured security profiles, including:

  • Antivirus
  • Anti-Spyware
  • Vulnerability Protection
  • URL Filtering
  • WildFire Analysis

Fast Path processing does not mean traffic bypasses security inspection.

12. Egress Processing

The firewall prepares the permitted packet for transmission. This may include QoS enforcement, fragmentation, or tunnel encapsulation.

The packet is then transmitted through the appropriate egress interface.

Key Takeaways

  • Route lookup precedes NAT policy lookup.
  • Destination NAT requires another route lookup.
  • NAT policy lookup precedes security policy lookup.
  • Session creation precedes application and content inspection.
  • Application identification can trigger security policy reevaluation.
  • Existing sessions can still undergo security inspection.

Understanding this processing order is particularly useful when troubleshooting unexpected policy matches, NAT behavior, and dropped traffic.

References

-eof-

This post is licensed under CC BY 4.0 by the author.