Skip to content

Block content using a list of terms

You may want to block all users from accessing websites that contain terms that your organization considers offensive. To do this, you create a list of terms and apply that list in a policy.

Objectives

When you complete this unit, you'll know how to do the following:

  • Create a list of terms to be blocked.
  • Create a content filter.
  • Apply the content filter to a policy.

Create a list of terms

  1. Create a new file using a text editor.
  2. Type terms to be blocked.

    For the text file, observe the following requirements:

    • Write each term on a separate line. The firewall evaluates the file on a line-by-line basis. For a match to occur, the line must be an exact match.
    • Metadata, comments, and column formatting are not supported.
    • Word lists containing characters outside of the ASCII character set must be saved using UTF-8 encoding.
    • Maximum file length is 2000 lines.
    • Maximum line length is 80 characters, including spaces and punctuation.
  3. Save the file as blocked.txt.

Create a content filter

Create a content filter and upload a list of words to filter.

  1. Go to Web > Content filters and click Add content filter.
  2. Enter a name.
  3. Click Choose file and select the file with the list of words to filter.

    Upload a file with words for content filtering

  4. Click Apply.

Apply a content filter to a policy

Add a rule to the default policy and apply the content filter to it.

  1. Go to Web > Policies.
  2. For the default policy, click Edit Edit button.
  3. Click Add rule. The firewall creates a default rule at the top of the rule hierarchy that blocks all HTTP traffic for all users. The rule is off.

    Add a rule

  4. Move the pointer over the Activities field, click the activity (AllWebTraffic), and then click the Content filters tab.

  5. Select the and with content check box.
  6. Select the Offensive content filter and click Apply selected items.

    Add a content filter

  7. Click the Status switch to turn the rule on.

    Turn on rule

  8. Click Save.

The firewall now contains a policy that blocks access to websites that contain words on the blocked list.

For the policy to take effect, add it to a firewall rule.

More resources