LAB 08 Web Filtering
LAB 08 Web Filtering
Sumário
Lab 8: Web Filtering ................................................................................................................................... 3
Objectives.......................................................................................................................................... 3
Exercise 1: Configuring FortiGuard Web Filtering....................................................................................... 4
Review the FortiGate Settings .............................................................................................................. 4
To review the restored settings on FortiGate .......................................................................................... 4
Determine Web Filter Categories ......................................................................................................... 5
Configure a FortiGuard Category-Based Web Filter................................................................................ 7
Apply the Web Filter Profile to a Firewall Policy ...................................................................................... 9
Test the Web Filter ............................................................................................................................ 10
Create a Web Rating Override ............................................................................................................ 11
Test the Web Rating Override ............................................................................................................. 12
Configure an Authenticate Action ...................................................................................................... 13
To create a user ................................................................................................................................ 13
Exercise 2: Configuring Static URL Filtering ............................................................................................ 16
Set Up the Static URL Filter in Flow-Based Inspection Mode ................................................................. 16
To review the web filter logs ............................................................................................................... 18
2
Lab 8: Web Filtering
In this lab, you will configure one of the most used security profiles on FortiGate: web filter. This includes
configuring FortiGuard category-based and static URL filters, applying the web filter profile in a firewall policy,
testing the configuration, and performing basic troubleshooting.
Objectives
• Configure web filtering on FortiGate
Time to Complete
Estimated: 30 minutes
3
Exercise 1: Configuring FortiGuard Web Filtering
To configure FortiGate for web filtering based on FortiGuard categories, you must make sure that FortiGate has
a valid FortiGuard security subscription license. The license provides the web filtering capabilities necessary to
protect against inappropriate websites.
Then, you must configure a category-based web filter security profile on FortiGate, and apply the security
profile in a firewall policy to inspect the HTTP traffic.
Finally, you can test different actions that FortiGate has taken, according to the website rating.
2. On the Dashboard, locate the Licenses widget, and then hover over Web Filter to confirm that the
service is licensed and active.
Because of the reboot following the restoration of the configuration file, the web
filter license status may be Unavailable. In this case, navigate
to System > FortiGuard. In the Filtering section, click Test Connectivity to
force an update, and then click OK to confirm. You can confirm, at the same
time, that Web Filter cache is enabled.
4
Notice that the default inspection mode is set to Flow-based.
7. Click OK.
2. Use the Web Filter Lookup tool to search for the following URL:
www.facebook.com
This is one of the websites you will use later to test your web filter.
5
3. Use the Web Filter Lookup tool again to find the web filter category for the following websites:
• www.skype.com
• www.ask.com
• www.bing.com
You will test your web filter using these websites also.
The following table shows the category assigned to each URL, as well as the action you will configure FortiGate
to take based on your web filter security profile:
6
Configure a FortiGuard Category-Based Web Filter
You will review the default web filtering profile, and then configure the FortiGuard category-based filter.
Category Action
7
Category Action
Unrated Block
The Edit Filter window opens, which allows you to modify the warning interval.
You will also enable the logs to store and analyze the security events that the web traffic generates.
If you require assistance, or to verify your work, use the step-by-step instructions
that follow.
After you complete the challenge, see Test the Web Filter on page 1.
3. In the Security Profiles section, enable Web Filter, and then select default.
4. Hover over the warning sign that appears beside the SSL Inspection field.
Because web filtering requires URL information and does not inspect the full
payload, you can select certification-inspection instead of deep-inspection.
6. Under Log Allowed Traffic, make sure that Security Events is selected.
9
Test the Web Filter
You will test the web filter security profile you configured for each category.
The get webfilter status and diagnose debug rating commands show the list of FDS that FortiGate uses to send
web filtering requests. In normal operations, FortiGate sends the rating requests only to the server at the top of
the list. Each server is probed for round-trip time (RTT) every 2 minutes.
Why does only one IP address from your network appear in the server list?
FortiGate sends the rating requests to FortiManager instead of to the public FDS.
For this reason, the output of the command lists the FortiManager IP address
only.
3. On the Local-Client VM, open a new browser tab, and then go to www.facebook.com.
A warning appears, according to the predefined action for this website category.
A warning appears, according to the predefined action for this website category.
10
5. Click Proceed to accept the warning and access the website.
This website appears because it belongs to the Search Engines and Portals category, which is set to Allow.
Field Value
URL www.bing.com
3. Click OK.
11
Test the Web Rating Override
You will test the web rating override you created in the previous procedure.
The website is blocked, and it matches a local rating instead of a FortiGuard rating.
The web rating override changes the category. In the default web profile applied
in the firewall policy, the Malicious Websites category is set to Block. As a
consequence, the website www.bing.com is now blocked.
12
Configure an Authenticate Action
You will set the action for the Malicious Websites FortiGuard category to Authenticate. You will then define a
user in order to test the authenticate action.
3. Under FortiGuard Category Based Filter, expand Security Risk, right-click Malicious Websites, and
then select Authenticate.
The Edit Filter window opens, which allows you to modify the warning interval and select the user groups.
Field Value
5. Click OK.
6. Click OK.
To create a user
1. Continuing on the Local-FortiGate GUI, click User & Authentication > User Definition.
Field Value
Username student
Password fortinet
5. Click Next.
6. Click Next.
13
7. Enable User Group, and then select Override_Permissions.
8. Click Submit.
1. On the Local-Client VM, open a new browser tab, and then try to access www.bing.com.
A warning appears. Notice that it is a different message from the one that appeared before.
2. Click Proceed.
You might receive a certificate warning at this stage. This is normal and is the
result of using a self-signed certificate. Accept the warning message to proceed
with the remainder of the procedure (click Advanced, and then click Accept the
Risk and Continue).
Field Value
Username student
14
Field Value
Password fortinet
4. Click Continue.
15
Exercise 2: Configuring Static URL Filtering
In this exercise, you will configure a static URL filter and apply the security profile to a firewall policy in flow-
based inspection mode. You will then review the web filter logs.
Field Value
URL www.bing.com
Type Simple
Action Block
Status Enable
6. Click OK.
7. Click OK.
16
To change the inspection mode to flow-based
1. Continuing on the Local-FortiGate GUI, click Security Profiles > Web Filter.
4. Click OK.
8. Click OK.
1. On the Local-Client VM, open a new browser tab, and then try to access www.bing.com.
A warning appears. Notice that it is a different message from the one that appeared before.
FortiGate applies the static URL filter before the FortiGuard category filter.
The www.bing.com URL matches the URL filter pattern and therefore is now
blocked, and FortiGate displays the corresponding URL filter message.
17
To review the web filter logs
1. Return to your browser tab where you are logged in to the Local-FortiGate GUI, and then click Log &
Report > Security Events.
Why is the first log entry for the www.bing.com website defined as blocked?
Initially, the www.bing.com website has the category Search Engines and Portals, which
was set to Allow and does not generate a security log.
To allow a website and generate a security log at the same time, you must set the category
to Monitor.
Remember that you overrode the Search Engines and Portals category to Malicious
Websites, which was set to Block, and then to Authenticate.
18
Stop and think!
Because the website is blocked by the static URL filter, FortiGuard does not apply the
FortiGuard web rating, and does not provide the category.
19