Palo Alto Networks firewalls use security policy rules to control traffic. These policies determine whether to allow or block traffic based on several match criteria and apply security profiles for advanced threat inspection. Matching is performed top-down and left-to-right until the first match is found.
All criteria must match for a rule to apply. If a match is found, no further rules are evaluated.
Security rules are evaluated from the top of the rulebase to the bottom and from left to right in each rule. Specific rules must be placed higher than general ones to take effect properly.
Security policies match based on the original (pre-NAT) source and destination addresses. This ensures policies are written from the network’s logical perspective. However, security profiles are applied after NAT processing.
Profiles add inspection for threats and application behavior. Attach profiles to Allow rules only:
Default policies:
flowchart TD A[Packet Enters Firewall] --> B[Match Source/Destination Zones] B --> C[Match Pre-NAT Source/Dest IPs] C --> D[Match App-ID/User-ID/Service] D --> E{Match Found?} E -- Yes --> F[Apply Rule Action] F --> G{Action == Allow?} G -- Yes --> H[Apply Security Profiles] G -- No --> I[Drop/Deny Packet] E -- No --> J[Evaluate Next Rule] J --> C