This article provides a way to use Enhanced Web Filtering (EWF) to block a specific HTTPS link within a website via custom objects.
For more information on basic SSL-proxy settings, refer to KB31122 - [SRX] Blocking HTTPS sites using EWF (Enhanced Web Filtering) [juniper.net] . For more help on configuring Enhanced Web Filtering, refer to KB30867 - [SRX] How to configure Enhanced Web Filtering to block HTTPS traffic via custom objects [juniper.net]
From version Junos OS 12.3X48-D25 and above, all SRX series of devices (except vSRX) can integrate the SSL proxy with the EWF feature. From version Junos OS 15.1X49-D40 and above, any SRX can integrate the SSL proxy with the EWF feature.
[edit security utm] root@SRX-240# show custom-objects { url-pattern { blacklist { value https://support.juniper.net; <<<< User defined HTTPS blacklist } } custom-url-category { bad { value blacklist; } } } feature-profile { web-filtering { type juniper-enhanced; juniper-enhanced { server { host rp.cloud.threatseeker.com; port 80; } profile test { category { bad { action block; <<<<< Block the specific link } } default permit; custom-block-message "This site is not allowed! GET BACK TO WORK!"; fallback-settings { default block; server-connectivity log-and-permit; timeout log-and-permit; too-many-requests log-and-permit; } } } } } utm-policy Lab-test { web-filtering { http-profile test; } }
If a syslog is configured on the device, you can see the following logs:
set system syslog file blocked-sites any any set system syslog file blocked-sites match WEBFILTER_URL_BLOCKED
root@SRX-240# run show log block Dec 4 08:40:58 SRX-240 RT_UTM: WEBFILTER_URL_BLOCKED: WebFilter: ACTION="URL Blocked" 192.168.1.1(52543)->66.129.230.17(443) CATEGORY="bad" REASON="BY_USER_DEFINED" PROFILE="test" URL= support.juniper.net OBJ=/ username N/A roles N/A Dec 4 08:40:58 SRX-240 RT_UTM: WEBFILTER_URL_BLOCKED: WebFilter: ACTION="URL Blocked" 192.168.1.1(52542)->66.129.230.17(443) CATEGORY="bad" REASON="BY_USER_DEFINED" PROFILE="test" URL= support.juniper.net OBJ=/favicon.ico username N/A roles N/A