Fortinet FortiGate Firewall Policies
FortiGate security policy configuration with address objects, service objects, UTM profiles, and IPv4 firewall policies.
What is it?
FortiGate firewall policies are stateful rules that control which traffic is allowed between interfaces. Unlike Palo Alto's zone-based model, FortiGate policies match on source interface and destination interface — not zones. Each policy can optionally apply UTM profiles: Antivirus, IPS sensor, Web Filter, and Application Control. The 'nat enable' flag inside a policy enables source NAT using the outgoing interface IP — a quick way to enable internet access without separate NAT objects. Policies are evaluated top-down; the first match wins.
When to use
- ·Allowing or blocking traffic between any two network segments (LAN to WAN, DMZ to LAN, etc.)
- ·Applying security scanning (AV, IPS, web filtering) to traffic flows
- ·Enabling NAT for internet-bound traffic directly within the policy
When NOT to use
- ·For complex DNAT/VIP scenarios — use FortiGate VIP objects with separate policies instead of inline NAT
- ·If you need application visibility without blocking — enable application logging first and build policies from actual traffic data
How it compares
Prerequisites
- →Source and destination interfaces must be configured before referencing in policies
- →Address objects should be created before policies reference them (or use 'all' for testing)
- →UTM profiles (AV, IPS, web filter) must be created before applying to policies
- →Policies are evaluated in order — place more specific rules above broader rules
Config Generator
Verification commands
get firewall policyList all firewall policies with IDs, names, and actions
ExpectedShows all policies in order. Verify the expected policy exists and has correct srcintf/dstintf.
diagnose firewall iprope lookup <src-ip> <dst-ip> <sport> <dport> <proto> <src-if>Test which policy matches specific traffic
ExpectedReturns the policy ID and action (accept/deny) that would apply to this traffic
Debug commands
diagnose debug flow filter addr <src-ip>Enable packet flow debug for a specific source IP
WarningUse in maintenance window — generates verbose output. Disable after: 'diagnose debug flow filter clear'
Common mistakes & fixes
Further learning
Recommended books to go deeper on this topic.
Palo Alto Networks Firewall Deployment and Administration
Tom Piens · Packt · Security policies, App-ID, User-ID, service objects — the PAN-OS bible
Network Security Architectures
Sean Convery · Cisco Press · Firewall design patterns and policy best practices — vendor-agnostic