FortiClient
FortiClient proactively defends against advanced attacks. Its tight integration with the Security Fabric enables policy-based automation to contain threats and control outbreaks. FortiClient is compatible with Fabric-Ready partners to further strengthen enterprises’ security posture.
adriellousada
Article Id 421179
Description This article describes how to use regular expressions to perform granular website allowance or blocking within the FortiClient EMS web filter.
Scope FortiClient EMS
Solution

To block or allow websites using regular expressions (regex) in FortiClient EMS, follow these steps:

  1. Open FortiClient EMS and navigate to Endpoint Profiles -> Web Filter.
  2. Find the profile that will be edited.
  3. Find the 'Exclusion List' section.
  4. Select 'Add' and select the desired action for this URL.
  5. Select the 'Regular Expression' type.
  6. In the URL field, enter the desired regular expression pattern.
  7. Apply the change by selecting Save'.

 

Example 1:

To allow all URLs from the subdomain 'fortinet.com.' The Web Filter configuration will be:

  • Action: Allow.
  • Type: Regular Expression.
  • URL: .*\.fortinet\.com.*



web-filter-regex.gif

 

All the following URLs, for example, will match this rule, as the regex will find the configured string 'fortinet.com':

  • community.fortinet.com/t5/forticlient/tkb-p/TKB10
  • docs.fortinet.com/product/forticlient/7.4


Example 2:

To block all websites that have the word 'forticlient' between the slashes in the URL:

  • Action: Block.
  • Type: Regular Expression.
  • URL: .*\/forticlient\/.*.

    web-filter-regex-block.gif

 

The URLs below will match the rule, but using the string '/forticlient/':

  • community.fortinet.com/t5/forticlient/tkb-p/TKB10
    docs.fortinet.com/product/forticlient/7.4

Note:

The examples are for illustrative purposes only. It is essential to verify the need for each case, as a very broad regular expression may allow or block inappropriate websites. Avoid generic terms and always be specific when defining what will be filtered by the regular expression.