FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Anonymous
Not applicable
Article Id 241139
Description

This article describes how NGFW policy-based mode handles FortiGuard URL Category- and Application-based Filtering when operating in NGFW policy-based mode.

Scope FortiGate; NGFW policy-based mode
Solution

FortiGates support two modes for Next Generation Firewall (NGFW) functionality, which in-turn impact how security inspection and policy matching operate:

  • NGFW profile-based mode is the default mode, where security profiles (such as Antivirus, Web Filter, Application Control, etc.) are created and then attached to Firewall Policies.
    • Notably, Firewall Policies must be matched first (via Source/Destination IP and Service port matching) before security inspection is executed (i.e., match a policy and then apply inspection based on the assigned profiles).
  • NGFW policy-based mode is an alternative mode where traffic always undergoes flow-based inspection during session setup (via the IPS Engine's Policy Match Engine, or PME). Because inspection is always taking place, NGFW policy-mode FortiGates can utilize Application- and URL Category-based matching directly in Security Policies.
    • The FortiGate can scan traffic to determine what Application signature and/or FortiGuard URL Category it belongs to, then it can use that information to determine which Security Policy should match to this traffic. Once the Security Policy is matched, follow-up inspection can take place (such as IPS, Antivirus, File Filtering, etc.).

 

This functionality serves as a notable advantage for NGFW policy-based mode, where it becomes possible to have more granular policy matching, though at the slight cost of slower policy matching (the FortiGate must allow some traffic through so that it can scan, identify, and subsequently take action on that traffic). For example, an administrator could create Security Policies for traffic matching the Microsoft.Teams and Zoom Application signatures, rather than needing to whitelist based on IP ranges, FQDNs, and network ports. Note as well that this functionality does not require the administrator to apply a Web Filter profile to the Security Policy.

 

To change the FortiGate's NGFW mode use the following command:

 

config system settings

set ngfw-mode [profile-based | policy-based]

end

 

Note: changing the mode on an existing FortiGate/VDOM will result in all existing policies being deleted/removed, as the policy structure is significantly different between the two modes. It may also be necessary to log out and log back in to the FortiGate GUI to reflect the new mode's layout.

 

Once in NGFW policy-based mode, navigate to Policy & Objects -> Security Policy, then select Create New. In the policy creation page, the options for Application and URL category will be present.

 

NGFW_New_Security_Policy.png

Important: take note of the following notable behaviors/limitations for these filtering options:

  • Adding Application- and/or URL category-based filtering to Security Policies implicitly enables the functionality within the IPS Engine PME (i.e., adding Application filtering implicitly enables Application Control, adding URL categories enables Web Filter lookups to FortiGuard).from a licensing/feature-usage standpoint, particularly for Web Filtering since it requires an active license to make category rating requests to FortiGuard.
  • Certain Applications will not be available for usage in Security Policies due to a limitation called ngfw-max-scan-range. In these cases, a error message stating 'Application XXXXX is incompatible with NGFW Policy mode due to large scan-range detection requirements' will be produced for .
  • When combining URL categories with Application filtering, the list of allowed Applications becomes limited to those that support HTTP (TCP/80) and HTTPS (TCP/443) web traffic. The GUI will warn of 'Invalid entries' when URL categories are added to Security Policies that have non-web Application signatures, and it will also prevent administrators from selecting those signatures for new policies (e.g., disallowed Applications will be hidden):

 

NGFW_Invalid_Entries_URL+Application.png

 

 

Related documents:

Technical Tip: Profile-based policies vs Policy-based policies 

FortiGate Admin Guide - NGFW policy