Technical Tip: FortiGate Web Filtering and the impact of HTTP/2 multiplexing and connection coalescing
| Description | This article describes how the multiplexing and connection coalescing features of HTTP/2 web traffic can impact Web Filtering and certificate inspection on the FortiGate, why this is expected, and what can be done to improve inspection capabilities. |
| Scope | FortiGate. |
| Solution | With HTTP/1.1 and earlier, HTTP web clients would traditionally make separate TCP connections for each domain being requested. Since the TLS handshake occurs separately for each TCP connection, it was relatively straightforward for the FortiGate to identify the FQDN associated with each stream for Web Filtering.
With HTTP/2 and later, multiplexing and connection coalescing were made available as new feature enhancements. When a client makes HTTP/2 requests to several FQDNs that have overlapping IP addresses, it is possible for a single shared TCP session to be created that supports simultaneous HTTP requests going to multiple different sub-domains/FQDNs.
This HTTP/2 multiplexing and coalescing functionality has a notable effect on FortiGate-based Web Filtering, specifically when using TLS certificate-inspection and when attempting to make allow/block decisions based on specific sub-domains (i.e., allow a.example.com but block b.example.com).
Notes:
The problem: As a reminder, Web Filtering + certificate-inspection will scan a connection while the TLS handshake is occurring and uses the following information to make an allow/block decision:
One issue here is that Web Filtering + certificate-inspection can only make an allow/block decision during this scan of the initial TLS handshake. After that point, the connection is encrypted, and the HTTP payload is inaccessible to Web Filtering.
Since an HTTP/2 connection allows the client to establish a single connection that can be reused for multiple sub-domains (that share the destination IP address), it becomes possible for a client to make an initial connection to an allowed domain, then make multiple follow-up requests within that now-encrypted connection for potentially disallowed sub-domains.
For example:
Resolving this issue: As noted earlier, this issue only applies when pairing Web Filtering with TLS certificate-inspection, and so the first recommendation is to consider implementing TLS deep-inspection.
When using TLS deep-inspection, the FortiGate acts as a machine-in-the-middle (MITM) and can continuously decrypt and inspect the actual HTTP payload. This allows Web Filtering to continue scanning the encrypted HTTPS connection and make allow/deny decisions for any HTTP requests made by the client over the shared/multiplexed connection.
If TLS deep-inspection is not feasible to deploy in the environment (see also: SSL/TLS deep inspection), then administrators should instead consider making allow/block decisions based on whole domains (e.g., block example.com as a whole, rather than specific sub-domains).
Additional notes:
Related documents: Virtual server load balance multiplexing Virtual server stops working after upgrading to FortiOS firmware 7.2.4 build 1396 HTTP2 connection coalescing and concurrent multiplexing for ZTNA |

