Skip to main content
jdelafuente_FTNT
Staff & Editor
Staff & Editor
Feb 11, 2024 3:40 PM UTC

Technical Tip: Creating a Web Filter profile with user authentication

  • Apr 24, 2026 3:31 PM UTC
  • 0 replies
  • 9279 views
  • Translate All
Description

 

This article describes how to configure user authentication for a specific FortiGuard Web Filter category.

 

Scope

 

FortiGate, Web filter.

 

Solution

 

Requirements:

  • A valid FortiGuard Web Filter license.
  • An authentication server: Local, LDAP, or RADIUS.
  • An active connection to FortiGuard.

 

  1. User Group:

Configure a specific user group. It can be Local, LDAP, or RADIUS. For this exercise, a Local user group will be used.

Note: FSSO and SAML user groups are not supported for now.

  • To create a user: go to User & Authentication -> User Definition -> Create New -> Local User -> Enter a username + password -> for Two-factor choose 'none' -> Select Finish.
  • Create user group: go to User & Authentication -> User Groups -> Create New -> Name, enter 'Firewall', and for members, choose 'select previously created', then select OK.


WebFilterAuth.png

 

Note: The user group can be LDAP or Radius.

 

  1. Web Filter profile:

Go to Security Profiles -> Web Filter -> Create New -> Name, FortiGuard Category Based Filter -> Select Category -> Authenticate. 

 

WebFilterAuth2.png

 

For this example, a social network is used.
After selecting the user group created in point 1, define the time range for the warning interval in hours, minutes, and/or seconds. Select OK.

 

Note: This warning level will define the interval after which the timer will expire. In this particular example, after 2 hours, the user will no longer be able to access the website until the authentication happens again. This case will hold particularly for streaming platforms such as YouTube, where the video will stop after two hours.

 

WebFilterAuth3.png

 

After, remember to select OK in the next screen to save the Web Filter Profile.

 

CLI reference:

Use the following command to see the website category ID:

 

get webfilter categories

 

Set the category to authenticate and add the user group.

 

config webfilter profile

    edit "default"

        config ftgd-wf

            config filters

                edit 36

                    set category 37

                    set action authenticate

                    set warn-duration 2h5m

                    set auth-usr-grp "usergroup"

                next

            end

        end

    next

end

 
  1. Firewall Policy:

Create a firewall policy and select the Web Filter 'WebAuth' profile created in point 2.

  • Name: WebAuthTest.
  • Incoming Interface: LAN.
  • Outgoing Interface: WAN.
  • Source: all.
  • Destination: all.
  • Service: all.
  • NAT: Enabled.
  • Web Filter: WebAuth.
  • SSL Inspection: Certificate Inspection.

 

  1. Test:

Open a web browser and try to reach any site belonging to a category such as Facebook. A certificate error may appear: to prevent this, install the Fortinet_CA_SSL certificate as a trusted root certificate in the PC.

 

WebFilterAuth4.png

 

Select Proceed and authenticate with user credentials.

 

WebFilterAuth5.png

 

If authentication is successful, access will be allowed.

 

WebFilterAuth7.png

 
  1. Log:

Go to Log & Report -> Events -> User Events.

 

WebFilterAuth6.png
Notes:

  1. The policy inspection mode should be set to 'Proxy-based' in v7.2.x and v7.0.x.
  2. Starting from v7.4.4, this functionality will work with policy inspection mode set to 'Flow-based'.
  3. With FIPS-CC enabled, this feature is available in v7.4.8+ with Proxy-based inspection.

 

If authentication is failing for external servers like LDAP or FSSO servers, use the below debugs:

 

diagnose debug disable
diagnose debug reset
diagnose debug console timestamp enable
diagnose debug enable
diagnose debug application fnbamd -1
diagnose debug application authd 8256

diagnose debug disable -> To disable debug.

diagnose debug reset -> To reset the debug filter.

 

Related documents:

Flow Mode Webfilter Support (Warning/Authenticate/Override)

Flow-based web filtering.

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024