Starting from Junos OS release 18.2R1, unified policies are supported on SRX devices, which enables granular control and enforcement of dynamic Layer 7 applications within the traditional security policy. However, when configuring unified policies with EWF (Enhanced Web Filtering) policies blocking HTTPS sites based on SNI (Server Name Indication) extension, the HTTPS websites may not be blocked as expected. Refer to KB31122 - Blocking HTTPS sites using EWF [juniper.net]
This article demonstrates the default behavior of unified policies handling of EWF with SNI based HTTPS URL filtering.
Consider the following example in which unified policies are deployed with UTM EWF policy to block a HTTPS site based on SNI:
security { utm { custom-objects { url-pattern { blacklist { value https://www.juniper.net; } } custom-url-category { blocked_websites { value blacklist; } } } feature-profile { web-filtering { url-blacklist blocked_websites; type juniper-enhanced; juniper-enhanced { server { host rp.cloud.threatseeker.com; port 80; } } } } utm-policy utm1 { web-filtering { http-profile Webfilter_Policy; } } }
[edit security policies from-zone trust to-zone untrust]
policy Internet { match { source-address any; destination-address any; application junos-defaults; dynamic-application any; } then { permit { application-services { utm-policy utm1; } } } }
The expectation from the above configuration example is to block https://www.juniper.net. However, when attempted to access https://www.juniper.net, the firewall does not block this access.
The solution is to configure category action in the global default service policy as follows:
set security utm default-configuration web-filtering juniper-enhanced category blocked_websites action block