Description

This article explains how to block all HTTP/HTTPS websites using enhanced web filtering and allow only a select few websites as per the requirements.

Symptoms

If you do not want to configure the below statement for each and every category present in the database.

set security utm feature-profile web-filtering juniper-enhanced profile ewf_my_profile category Enhanced_Hacking action block

Solution

Let's assume you want to allow only the Zoom application while blocking the rest of the websites. For this scenario, please refer to the following examples, which demonstrate how to block all websites except Zoom.

--Enable Enhanced Web filtering.

set security utm feature-profile web-filtering type juniper-enhanced
 

--Create the custom URLs for Whitelist.

set security utm custom-objects url-pattern zoom-url value *.zoom.com

set security utm custom-objects url-pattern zoom-url value *.zoom.us

 

--Create a custom category for the above URLs.

set security utm custom-objects custom-url-category zoom-category value zoom-url

 

--Create a UTM profile to allow the category and add the default action as block.

set security utm feature-profile web-filtering juniper-enhanced profile zoom-profile zoom-category permit

set security utm feature-profile web-filtering juniper-enhanced profile zoom-profile default block

 

--Create a UTM policy with the UTM profile created.

set security utm utm-policy zoom-policy web-filtering http-profile zoom-profile

 

--Use the UTM policy in the security policy as per the requirement.

set security policies from-zone trust to-zone untrust policy test match source-address 10.0.188.2/32

set security policies from-zone trust to-zone untrust policy sec_policy match destination-address any

set security policies from-zone trust to-zone untrust policy sec_policy match application any

set security policies from-zone trust to-zone untrust policy sec_policy then permit application-services utm-policy zoom-policy

Modification History

08-31-2023: Initial version