This recipe explains how to use a static URL filter to block access to Facebook and its subdomains.
By using SSL inspection, you ensure that Facebook and its subdomains are also blocked when accessed through HTTPS.
Go to System > Feature Select to enable the Web Filter feature.
Go to Security Profiles > Web Filter and edit the default Web Filter profile.
To block Facebook, go to Static URL filter, select URL Filter, and then click Create.
Set URL to *facebook.com. Set Type to Wildcard, set Action to Block, and set Status to Enable.
Go to Policy & Objects > IPv4 Policy, and click Create New. Give the policy a name that identifies its use.
Set Incoming Interface to the internal network and set Outgoing Interface to the Internet-facing interface.
Under Security Profiles, enable Web Filter and select the default web filter profile.
Enable certificate-inspection from the dropdown menu. This allows the FortiGate to inspect and apply web filtering to HTTPS traffic.
The new policy has to be first on the list in order to be applied to Internet traffic. Confirm this by viewing policies By Sequence.
To move a policy up or down, click and drag the far-left column of the policy.
HTTPS is automatically applied to facebook.com, even if it is not entered in the address bar. A FortiGuard Web Page Blocked! message appears.
Visit a subdomain of Facebook, for example, attachments.facebook.com.
A FortiGuard Web Page Blocked! message appears, blocking the subdomain.