Technical Tip: Profile-based policies vs Policy-based policies
Description
This article describes common behaviors and sets better expectations when choosing between profile-based and policy-based operations.
This is one of the first decisions to make when setting up the FortiGate. This expected behavior will be found when converting the policy-based unit to a profile-based operation, or the other way around.
Ideally, this conversion has to be planned in advance and not be performed on a production unit.
Scope
FortiGate.
Solution
- Profile-based (traditional, default).
Each policy will have its own set of profiles. More flexibility in customization.

Security profile groups can be used (see above policy ID#2: Security Profiles 'GRP').
It has to be configured, enabled, and used from the CLI.
set profile-type group
set profile-group #name#
Cookbook: Security Profile Groups
- Policy-based (newer mode; allows access to applications and URL categories directly in policies; operates only in flow-based mode).

- Converting from default to NGFW policy-based, important notes:
The v6 cookbook 'Profile-based NGFW vs policy-based NGFW' incorrectly mentions a conversion:
'Switching from profile-based to policy-based mode converts your policies to policy-based. To avoid issues, create a new VDOM for the policy-based mode'.
There is no conversion. All the policies are deleted.
IPv4 policy: It will not be visible in the GUI or CLI anymore. All existing policies were deleted.
Security policy: It will become the default way to apply security profiles. The inspection-mode is flow; it cannot be changed the mode to proxy-based per policy.
SSL Inspection & Authentication: SSL inspection is applied per source/destination interfaces and services (less granular than per policy).
If the FortiGate is situated on a NAT boundary, such as between a private network and public Internet, a Central SNAT policy is required for outbound traffic.
- Reverting from NGFW policy-based to profile-based, important notes:
Depending on how the configuration was originally applied, Central SNAT may be initially enabled or disabled when setting NGFW mode to profile-based from policy-based. Any existing Central SNAT policies are not deleted, but they do not apply if central-nat is disabled.

set ngfw-mode profile-based
Changing to profile-based mode will remove all firewall policy/security-policy in this VDOM
Do you want to continue? (y/n)y
end
- The difference in the firewall policy path structure.
- In policy-based mode:
‘Security Policy’ has its configuration path = ...ng/firewall/policy/security-policy/standard
In CLI, it is represented by CLI 'config firewall security-policy'.

In CLI, it is represented by CLI 'config firewall policy'.

 
- In profile-based mode.
Refresh the GUI (no need to reboot/restart the Firewall) to see the change.
‘Firewall policy’ has its configuration path = ...ng/firewall/policy/policy/standard.
 
