Description

This article provides the configuration for how to Block All Website Access and Except Few Websites using local web filtering

Solution

Here is the below step by step configuration for the same.

-Enable local Web filtering.

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

 

--Create the custom URLs for Whitelist.

set security utm custom-objects url-pattern abc-url value https://*.abc.com

set security utm custom-objects url-pattern abc-url value https://*.abc.us

 

--Create a custom category for the above URLs.

set security utm custom-objects custom-url-category test-category value abc-url

 

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

set security utm feature-profile web-filtering juniper-local profile abc-profile test-category permit

set security utm feature-profile web-filtering juniper-local profile abc-profile default block

 

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

set security utm utm-policy test-policy web-filtering http-profile abc-profile

 

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

set security policies from-zone trust to-zone untrust policy sec_policy 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 test-policy


Note:-
It works for main URLs, if you want to block sub urls or child URLs or redirected URLs to allow or block using local -webfiltering, you need to configure SSL-proxy

Modification History

2025-02-18 : Article Created

2025-10-107 : Change to external 

2026-05-08: made the following changes: 

 1- Change ""zoom-url"" by ""abc-url""
 2- Change ""test-profile"" by ""abc-profile"""