Created on
11-25-2022
11:16 PM
Edited on
10-09-2025
09:38 PM
By
Anthony_E
This article describes how to implement a basic policy set for Next-Generation Firewall (NGFW) policy-based mode using an example of allowing Internet Access for LAN users.
FortiGate; NGFW policy-based mode
The FortiGate supports two NGFW operational modes, which can be set on a per-VDOM basis (or globally, for non-VDOM FortiGates):
To check if the FortiGate is in NGFW mode, look for the ngfw-mode setting under config system settings:
FortiGate (ngfw_vdom) # get system settings | grep ngfw-mode
ngfw-mode : policy-based
Important note:
Changing from one NGFW mode to another will remove all the existing firewall policy configurations since they are non-transferrable between modes.
In NGFW policy-based mode, firewall policies are split into three separate components that need to be configured in order for a basic policy to function. These components are as follows:
| GUI (under 'Policy & Objects') | CLI-equivalent |
| SSL Inspection & Authentication Policy | config firewall policy |
| Security Policy | config firewall security-policy |
| Central SNAT** | config firewall central-snat-map |
**not mandatory if Source NAT is not required for a given traffic flow.
The above policy components are assessed in the following sequential order. If traffic does not have an appropriate match for the first two sections (SSL Inspection & Authentication Policy and Security Policy) then it will be dropped by implicit-deny, whereas Central SNAT is implicit-allow (with no Source NAT occurring) if a policy is not matched:
SSL Inspection & Authentication Policy (via the kernel) -> Security Policy (via the IPS Engine/Policy Match Engine) -> Central SNAT (via the kernel)
Note:
This article assumes that the FortiGate already has appropriate network routes (connected, static, dynamic, etc.) to determine how to reach a given destination, as well as satisfy reverse path filter (RPF) checks. For more info on this, see: Technical Tip: Reverse Path Forwarding (RPF) implementation and use of strict-src-check enable|disab...
Example configuration:
The following shows an example CLI configuration of a basic policy set that allows a local user to send traffic in on the FortiGate's 'internal' interface and out to the Internet via 'wan1'. A Central SNAT policy has also been added to Source NAT the traffic as it goes out wan1.
SSL Inspection & Authentication Policy:
config firewall policy
edit 1
set name 'Internet_SSL_Policy'
set srcintf 'internal'
set dstintf 'wan1'
set srcaddr 'all'
set dstaddr 'all'
set service 'ALL'
next
end
Security Policy:
config firewall security-policy
edit 1
set name 'Internet_Security_Policy'
set srcintf 'internal'
set dstintf 'wan1'
set srcaddr 'all'
set dstaddr 'all'
set action accept
set schedule 'always'
set logtraffic all
next
end
Central SNAT:
config firewall central-snat-map
edit 1
set srcintf 'internal'
set dstintf 'wan1'
set orig-addr 'all'
set dst-addr 'all'
next
end
Important note:
Related Documents:
Technical Tip: NGFW policy-based mode Resource List
FortiGate Admin Guide - NGFW Policy
Technical Tip: Basic command for investigating firewall policy based mode traffic
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.