Description

The command, 'show security utm session' provide statistics of sessions processed by the Unified Threat Management (UTM) feature. However, it does not contain the session which is processed by the web filtering feature.

Symptoms

Example

The following configuration is to block HTTP traffic destined to www.abc.com and permit one to www.xyz.com using the web filtering feature:

Configuration set security utm custom-objects url-pattern cstm-wht-url value http://www.xyz.com
set security utm custom-objects url-pattern cstm-blk-url value http://www.abc.com
set security utm custom-objects custom-url-category utm-po1-wht value cstm-wht-url
set security utm custom-objects custom-url-category utm-po1-blk value cstm-blk-url
set security utm feature-profile web-filtering url-whitelist utm-po1-wht
set security utm feature-profile web-filtering url-blacklist utm-po1-blk
set security utm feature-profile web-filtering type surf-control-integrated
set security utm utm-policy utm-po1 web-filtering http-profile junos-wf-cpa-default

set security policies from-zone untrust to-zone trust policy u2t-p01 match source-address any
set security policies from-zone untrust to-zone trust policy u2t-p01 match destination-address any
set security policies from-zone untrust to-zone trust policy u2t-p01 match application junos-http
set security policies from-zone untrust to-zone trust policy u2t-p01 then permit application-services utm-policy utm-po1
A client 2.2.2.2 accesss to http://www.abc.com(1.1.1.1) - which is in black-list per configuration. The flow session is shown as follows:
 

root> show security flow session application http 
Session ID: 22453, Policy name: u2t-p01/4, Timeout: 1762, Valid   
In: 2.2.2.2/55863 --> 1.1.1.1/80;tcp, If: ge-0/0/1.0, Pkts: 9, Bytes: 1197   
Out: 1.1.1.1/80 --> 2.2.2.2/55863;tcp, If: fe-0/0/6.0, Pkts: 8, Bytes: 4589   
Total sessions: 1

However, no counter is increased in 'show security utm session' .

root> show security utm session 
UTM session info: 
Maximum sessions:                4000 
Total allocated sessions:        0 
Total freed sessions:            0 
Active sessions:                 0    <--- There is no Active UTM Session, while actually web-filtering is utilized per configuration.

Solution

This behavior is by design. The 'show security utm session' command displays UTM session statistics and the information displayed in this command is gathered from the application proxy in SRX.  However, web filtering does not use application proxy, so the statistics does not show the number of web filtering session. This is true not only for surf-control integrated web filtering but also all web filtering types.

To check web filtering session, use 'show security utm web-filtering statistics'

root> show security utm web-filtering statistics
 UTM web-filtering statistics:
    Total requests:                     1
    white list hit:                     0
    Black list hit:                     1     <--- web-filtering results 1 hit on Black list
    Queries to server:                  0
    Server reply permit:                0
    Server reply block:                 0
    Custom category permit:             0
    Custom category block:              0
    Cache hit permit:                   0
    Cache hit block:                    0
    Web-filtering sessions in total:    8000
    Web-filtering sessions in use:      1     <--- Total in-use web-filtering now.
    Fallback:                       log-and-permit           block
          Default                                 0               0
          Timeout                                 0               0
     Connectivity                                 0               0
Too-many-requests                                 0               0