Created on 04-24-2020 12:45 AM Edited on 07-14-2023 02:15 AM By Stephen_G
Description
This article describes how to block IP based HTTPS web site access when a static URL filter is configured in a web filter profile.
Scope
Any version of FortiGate.
Solution
This article assumes the existence of a web filter profile that's configured with static URL filters.
With this web filter profile applied to a firewall policy, the end user is able to browse to a HTTPS web site when accessed as 'https://1.1.1.1' which is not part of the allowed URL listed in static URL filters.
Below is the config of the web filter profile named 'blockprofile'.
No FortiGuard Category based filter is enabled. Only a Static URL filter is configured with few allowed URLs, where anything else is blocked as per the 'Block' Wildcard entry shown in the bottom of this screenshot:
The following results are observed when the URL filter is set to block 1.1.1.1* as a wildcard entry:
Command | Result |
curl -o /dev/null -vL --resolve one.one.one.one:80:1.1.1.1 http://one.one.one.one | Blocked - matched ip-of-server. |
curl -o /dev/null -vL --resolve one.one.one.one:80:1.1.1.1 http://1.1.1.1 | Blocked - matched host header. |
curl -o /dev/null -vk --resolve one.one.one.one:443:1.1.1.1 https://one.one.one.one | Blocked - matched ip-of-server. |
curl -o /dev/null -vk --resolve one.one.one.one:443:1.1.1.1 https://1.1.1.1 | Blocked - matched SNI. |
Command | Result |
curl -o /dev/null -vL --resolve one.one.one.one:80:1.1.1.1 http://one.one.one.one | Allowed - no match. |
curl -o /dev/null -vL --resolve one.one.one.one:80:1.1.1.1 http://1.1.1.1 | Blocked - matched host header. |
curl -o /dev/null -vk --resolve one.one.one.one:443:1.1.1.1 https://one.one.one.one | Allowed - no match. |
curl -o /dev/null -vk --resolve one.one.one.one:443:1.1.1.1 https://1.1.1.1 | Blocked - matched SNI. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.