[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Configuring Content Filtering

You can use J-Web or the CLI to configure the content filtering feature. When configuring content filtering, you must first create the custom objects you are using. Those custom objects may include protocol command lists, file extension lists, MIME pattern lists, and MIME exception lists. Once you have created your custom objects, you can configure content filtering,

This topic contains:

Configuration Overview

For each UTM feature, you should configure feature parameters in the following order:

  1. First configure UTM custom objects (if any), for the feature in question. Custom objects are global parameters for UTM features. This means that configured custom objects apply to all UTM policies where applicable, rather than only to individual policies.

    The CLI commands for setting content filtering custom objects are:

    user@host# set security utm custom-objects protocol-command
    user@host# set security utm custom-objects filename-extension
    user@host# set security utm custom-objects mime-pattern
  2. Configure main feature parameters, called feature profiles.

    The CLI command for setting content filtering feature profiles is:

    user@host# set security utm feature-profile content-filtering
  3. Configure a UTM policy for each protocol and attach this policy to a profile.

    CLI commands for configuring a UTM policy for HTTP (for example) and attaching that policy to a profile are:

    user@host# set security utm utm-policy <name>
    user@host# set security utm utm-policy utmp4 content-filtering ftp download-profile ftp1
  4. Attach the UTM policy to a firewall security policy.

    The CLI command for attaching a UTM policy to a security policy is:

    user@host# set security policies
    user@host# set security policies from-zone trust to-zone untrust policy p4 then permit application-services utm-policy utmp4

J-Web Configuration

To configure content filtering using the J-Web configuration editor, you must first create your custom objects (Protocol Command List, Filename Extension List, MIME Pattern List).

Configure a Protocol Command Custom Object as follows (See Types of Content Filters for information on protocol commands.):

  1. Select Configure>Security>UTM>Custom Objects.
  2. From the Protocol command List tab, click Add to create command lists. (To edit an existing item, select it and click Edit.)
  3. Next to Protocol Command Name, enter a unique name for the protocol list you are creating. (This name appears in the Permit command and Block command lists when you configure a content filter profile.)
  4. Next to Protocol Command Value, enter the command for the protocol in question.
  5. Click Add to add your protocol command to the Values list box.

    Within this box, you can also select an item and click Delete to remove it. Continue to add protocol commands in this manner.

  6. Click OK to save the selected values as part of the protocol command list you have created.
  7. If the configuration item is saved successfully, you receive a confirmation and you must click OK again. If it is not saved successfully, you can click Details in the pop-up window that appears to discover why.

Configure a Filename Extension List Custom Object as follows :

  1. Select Configure>Security>UTM>Custom Objects.
  2. From the Filename Extension List tab, click Add to create extension lists.
  3. Next to File Extension Name, enter a unique name for the list you are creating. (This name appears in the Block extension list when you configure a content filter profile.)
  4. In the Available Values box, select one or more default values (press Shift to select multiple concurrent items or press Ctrl to select multiple separate items) and click the —> right arrow button to move the value or values to the Selected Values box.
  5. Click OK to save the selected values as part of the extension list you have created.
  6. If the configuration item is saved successfully, you receive a confirmation and you must click OK again. If it is not saved successfully, you can click Details in the pop-up window that appears to discover why.

Configure a MIME Pattern List Custom Object as follows :

  1. Select Configure>Security>UTM>Custom Objects.
  2. From the MIME Pattern List tab, click Add to create MIME pattern lists.
  3. In the Add MIME Pattern pop-up window, next to MIME Pattern Name, enter a unique name for the list you are creating.

    Keep in mind that you are creating a MIME block list and a MIME block exception list (if necessary). Both MIME lists appear in the Block MIME list and the Block MIME exception list fields when you configure content filtering. Therefore, the MIME list names you create should be as descriptive as possible.

  4. Next to MIME Pattern Value, enter the MIME pattern.
  5. Click Add to add your MIME pattern to the Values list box.

    Within this box, you can also select an entry and use the Delete button to delete it from the list. Continue to add MIME patterns in this manner.

  6. Optionally, create a new MIME list to act as an exception list.

    The exception list is generally a subset of the main MIME list.

  7. Click OK to save the selected values as part of the MIME list you have created.
  8. If the configuration item is saved successfully, you receive a confirmation and you must click OK again. If it is not saved successfully, you can click Details in the pop-up window that appears to discover why.

Now that your custom objects have been created, you can configure the content-filtering feature profile.

  1. Select Configure>Security>UTM>Content Filtering.
  2. Click Add to create a profile for content filtering. (To edit an existing item, select it and click Edit.)
  3. Next to Profile name, enter a unique name in the box.
  4. Next to Permit command list, select the protocol command custom object you created for permitting commands from the list.

    The permit protocol command list is intended to act as an exception list for the block protocol command list.

    Note: Protocol command lists, both permit and block, are created using the same custom object.

  5. Next to Block command list, select the protocol command custom object you created for blocking commands from the list. (See Types of Content Filters for information on protocol commands.)
  6. Next to Block extension list, select the file extension list custom object you created for blocking extensions from the list.
  7. Next to Block MIME list, select the MIME pattern list custom object you created for blocking MIME patterns from the list.
  8. In the Block content type section, select content types in the Available content types box on the left and click the right arrow button —> to move items to the Selected content types box. (Press Shift to select multiple concurrent items or press Ctrl to select multiple separate items.)

    Note: Block content type applies blocks to other available content such exe, http cookie, Java applet, and so on. The list of content types available from the Block content type box are supported only for HTTP blocking.

  9. Select the Notifications Options tab.
  10. Next to Notification type, select Protocol or Message.
  11. Next to Notify mail sender, select Yes or No.
  12. If you selected Yes, in the Custom notification message box, enter text for your custom message for this notification in the box (if you are using a custom message).
  13. Click OK.
  14. If the configuration item is saved successfully, you receive a confirmation and you must click OK again. If it is not saved successfully, you can click Details in the pop-up window that appears to discover why.

    Note: You create a separate content filtering profile for each supported content filtering protocol. When you are creating your UTM policy for content filtering , the UTM policy configuration page provides separate content filtering profile selection fields for each supported protocol.

Next, configure a UTM policy for content filtering to which you attach the content filtering profile you have configured.

  1. Select Configure>Security>Policy>UTM Policies.
  2. From the UTM policy configuration window, click Add to configure a UTM policy.

    The policy configuration pop-up window appears.

  3. In the Main tab, next to the Policy Name box, enter a unique name for the UTM policy you are creating.
  4. In the Session per client limit box, enter a session per client limit from 0 to 20000 for this UTM policy.
  5. In Session per client over limit, select one of the following: Log and permit or Block.

    This is the action the device takes when the session per client limit for this UTM policy is exceeded.

  6. Select the Content filtering profiles tab in the pop-up window.
  7. Select the appropriate profile you have configured from the list for the corresponding protocol listed.
  8. Click OK.
  9. If the policy is saved successfully, you receive a confirmation and you must click OK again. If the profile is not saved successfully, you can click Details in the pop-up window that appears to discover why.

Next, attach the UTM policy to a security policy that you create.

  1. Select Configure>Security>Policy>FW Policies.
  2. From the Security Policy window, click Add to configure a security policy with UTM.

    The policy configuration pop-up window appears.

  3. In the Policy tab, enter a name in the Policy Name box.
  4. Next to From Zone, select a zone from the list.
  5. Next to To Zone, select a zone from the list.
  6. Choose a Source Address.
  7. Choose a Destination Address.
  8. Choose an Application. Do this by selecting junos-<protocol> (for all protocols that support content filtering) in the Application Sets box and clicking the —> button to move them to the Matched box.
  9. Next to Default Policy Action, select one of the following: Deny-All or Permit-All.
  10. Next to Policy Action, select one of the following: Permit, Deny, or Reject.

    Note: When you select Permit for Policy Action, several additional fields become available in the Applications Services tab, including UTM Policy.

  11. Select the Application Services tab in the pop-up window.
  12. Next to UTM Policy, select the appropriate policy from the list.

    This attaches your UTM policy to the security policy.

    Note: There are several fields on this page that are not described in this section. See the Security Policies section for detailed information on configuring security policies and all the available fields.

  13. Click OK to save your policy.
  14. If the policy is saved successfully, you receive a confirmation and you must click OK again. If the profile is not saved successfully, you can click Details in the pop-up window that appears to discover why.

    You must activate your new policy to apply it.

J-Web Point and Click CLI Configuration

To configure content filtering using the J-Web Point and Click CLI, you must first create your custom objects (Protocol Command List, Filename Extension List, MIME Pattern List).

Configure a Protocol Command Custom Object as follows:

  1. Select Configure>CLI Tools>Point and Click CLI.
  2. Next to Security, click Configure or Edit.
  3. Next to Utm, click Configure.
  4. Next to Custom objects, click Configure.
  5. Next to Protocol command, click Add new entry.
  6. Next to Name, enter a unique name for the list you are creating. (This name appears in the Permit command and Block command lists when you configure a content filter profile.)
  7. Next to Values, enter the commands for the protocol in question.
  8. Click OK. See Figure 116.

    Figure 116: Custom Object, Protocol Command Configuration, Point and Click CLI Configuration

    Image ve_proto_com.gif

Configure a Filename Extension List Custom Object as follows :

  1. Select Configure>CLI Tools>Point and Click CLI.
  2. Next to Security, click Configure or Edit.
  3. Next to Utm, click Configure.
  4. Next to Custom objects, click Configure.
  5. Next to Filename extension, click Add new entry.
  6. Next to Name, enter a unique name for the extension list you are creating.
  7. Next to Value, click Add new entry.
  8. Next to Value, enter the extensions.
  9. Click OK. See Figure 117.

    Figure 117: Custom Object, Filename Extension Configuration, Point and Click CLI Configuration

    Image ve_file_ext.gif

Configure a MIME Pattern List Custom Object as follows (see MIME White List for overview information on MIME white lists):

  1. Select Configure>CLI Tools>Point and Click CLI.
  2. Next to Security, click Configure or Edit.
  3. Next to Utm, click Configure.
  4. Next to Custom objects, click Configure.
  5. Next to Mime pattern, click Add new entry.
  6. Next to Name, enter a unique name for the MIME list you are creating.
  7. Next to Value, click Add new entry.
  8. Next to Value, enter the MIME pattern.
  9. Click OK. See Figure 118.

    Figure 118: Custom Object, MIME Pattern Configuration, Point and Click CLI Configuration

    Image ve_mime_pattern.gif

Now that your custom objects have been created, you can configure the content-filtering feature profile.

  1. Select Configure>CLI Tools>Point and Click CLI.
  2. Next to Security, click Configure or Edit.
  3. Next to Utm, click Configure.
  4. Next to Feature profile, click Configure.
  5. Next to Content filtering, click Configure.
  6. Next to Profile, click Add new entry.
  7. Next to Name, enter a unique name for this profile.
  8. Next to Block command, enter the protocol command custom object you created for blocking commands from the list.
  9. Next to Block content type, click Configure or Edit.
  10. Select one or more of the available check boxes to block ActiveX, exe, Http cookie, Java applet, and zip file content.
  11. Click OK.
  12. Next to Block extension, enter the file extension list custom object you created for blocking extensions from the list.
  13. Next to Block mime, select the Yes check box and click Configure or Edit.
  14. Next to Exception, enter the exception Mime list custom object you created for Mime patterns that will not be blocked.
  15. Next to List, enter the Mime list custom object you created for blocking Mime patterns.
  16. Next to Notification options, select the Yes checkbox and click Configure or Edit.
  17. Next to Permit command, enter the protocol command custom object you created for permitting commands from the list. (The permit protocol command list is intended to act as an exception list for the block protocol command list.)
  18. Click OK. See Figure 119 for the content filtering profile main window.

    Figure 119: Content Filtering Profile, Point and Click CLI Configuration

    Image ve_content_filter_profile.gif

Next, you configure a UTM policy for content-filtering to which you attach the profile you have configured.

  1. Select Configure>CLI Tools>Point and Click CLI.
  2. Next to Security, click Configure or Edit.
  3. Next to Utm, click Configure.
  4. Next to Utm policy, click Add new entry.
  5. In the Name box, enter a unique name for the UTM policy you are creating.
  6. Next to Content filtering, click Configure.
  7. In the Http, Imap, Pop3, or Smtp profile boxes, enter the name of the profile you created earlier. For Ftp, click Configure or Edit to enter Upload and Download profiles.

    Note: You create a separate content-filtering profile for each protocol. These profiles may basically contain the same configuration information, but when you are creating your UTM policy for a content-filtering profile, the UTM content-filter policy configuration page provides separate profile selection fields for each supported protocol.

  8. Click OK.
  9. Click OK again to return to main UTM configuration page. Your UTM content-filtering policy is now listed in the UTM policy table.

Next, you attach the UTM policy to a security policy that you create.

  1. Select Configure>CLI Tools>Point and Click CLI.
  2. Next to Security, click Configure or Edit.
  3. Next to Policy, select the Yes check box and click Edit.
  4. Next to Policy, click Add new entry.

    Note: Refer to the section on security policy configuration for further details on configuring a policy. Note that when you configure the Then field as part of the policy, select Permit as the action, and then configure Application services, you are able to enter the Utm policy name as part of this security policy.

  5. Next to Utm policy (in the Application services security policy window), enter the name of the appropriate policy. This attaches your UTM policy to the security policy.
  6. Click OK.

CLI Configuration

To configure content filtering using the CLI, you must first create your custom objects.

  1. Configure the protocol command list custom object by first creating a name for the list. See Types of Content Filters for information on protocol commands.
    user@host# set security utm custom-objects protocol-command ftpprotocom1
  2. Add commands to the list.
    user@host# set security utm custom-objects custom-objects protocol-command ftpprotocom1 value [user pass port type]
  3. Configure the filename-extension custom object by first creating a name for the list. See File Extension Scanning for information on file extension lists.
    user@host# set security utm custom-objects filename-extension extlist2
  4. Add extensions to the list.
    user@host# set security utm custom-objects filename-extension extlist2 value [zip js vbs]
  5. Configure MIME pattern lists. This includes creating a main MIME list and a MIME exception list for antivirus scanning. First create names for MIME lists and then add values to the lists. See MIME White List for overview information on MIME pattern lists.
    user@host# set security utm custom-objects mime-pattern cfmime1
    user@host# set security utm custom-objects mime-pattern ex-cfmime1
  6. Add MIME patterns to the lists.
    user@host# set security utm custom-objects mime-pattern cfmime1 value [video/quicktime image/x-portable-anymap x-world/x-vrml]
    user@host# set security utm custom-objects mime-pattern ex-cfmime1 value [video/quicktime-inappropriate]

Now that your custom objects have been created, you can configure the content-filtering feature profile.

  1. Create a profile as follows.
    user@host# set security utm feature-profile content-filtering profile confilter1
  2. Apply protocol block command custom objects to the content-filtering profile.
    user@host# set security utm feature-profile content-filtering profile confilter1 block-command ftpprotocom1
  3. Apply blocks to other available content such as exe, http-cookie, java-applet, and so on. The list of content types available from the “block-content-type” command are only supported for HTTP blocking.
    user@host# set security utm feature-profile content-filtering profile confilter1 block-content-type java-applet exe http-cookie
  4. Apply extension list custom objects to the content-filtering profile for blocking extensions.
    user@host# set security utm feature-profile content-filtering profile confilter1 block-extension extlist2
  5. Apply MIME pattern list custom objects to the content-filtering profile for blocking MIME types. If configured, you can also apply a MIME exception list.
    user@host# set security utm feature-profile content-filtering profile confilter1 block-mime list cfmime1 exception ex-cfmime1
  6. Apply protocol permit command custom objects to the content-filtering profile. (The permit protocol command list is intended to act as an exception list for the block protocol command list.)

    Note: Protocol command lists, both permit and block, are created by using the same custom object.

    user@host# set security utm feature-profile content-filtering profile confilter1 permit-command ftpprotocom2
  7. Next you configure the notification options. You can configure notifications with custom messages or configure no notification to be sent, as well. In this example, you configure a custom message and send a notification message. (You can configure a message notification for content-filtering.
    user@host# set security utm feature-profile content-filtering profile confilter1 notification-options custom-message “the action is not taken” notify-mail-sender type message
  1. Configure a UTM policy for a content filtering protocol and attach this policy to a profile. CLI commands for configuring a UTM policy for HTTP content filtering and attaching that policy to a profile you created earlier for content filtering are:
    user@host# set security utm utm-policy <name>
    user@host# set security utm utm-policy utmp4 content-filtering http-profile contentfilter1
  2. Attach the UTM policy to a firewall security policy.
    user@host# set security policies from-zone trust to-zone untrust policy p4 match source-address any
    user@host# set security policies from-zone trust to-zone untrust policy p4 match destination-address any
    user@host# set security policies from-zone trust to-zone untrust policy p4 match application junos-htttp
    user@host# set security from-zone trust to-zone untrust policy p4 then permit application-services utm-policy utmp4

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]