Skip to main content
GustavoDecenci
New Member
Jul 31, 2025 8:36 PM UTC
Question

Block internet access with web filter

Hi everyone!

I'm facing a specific need and would appreciate some help to understand the best way to configure this in FortiGate.

I need to completely block internet access for a specific IP range, and then allow access only to certain websites as needed.

Currently, I'm handling this using a Web Filter with the URL Filter option. Within the URL Filter, I have a rule that blocks all access, and above it, I add the URLs that need to be allowed. This Web Filter profile is applied to a firewall policy for the range.

This setup is working fine to allow access to sites for the entire range, but now I need to allow a specific site for only one IP, without affecting the rest of the IPs in the range, which must remain blocked.

My question is: what’s the best way to implement this kind of per-IP exception using Web Filter, without affecting the general rule that is already working for the rest of the range?

Thanks in advance for any help!

5 replies

Toshi_Esumi
SuperUser
SuperUser
Jul 31, 2025 8:44 PM UTC

If it's "IP-based" filtering, the best way is to allow specific IPs for HTTPS/HTTP with one policy, then deny any/all IPs(dst address) for HTTPS/HTTP for the next policy for the src/dst interface pair.

Toshi

Translate
GustavoDecenci
New Member
Jul 31, 2025 8:59 PM UTC

I do this for some exceptions but I need to make some exceptions with wildcard or regular expressions.

Translate
Toshi_Esumi
SuperUser
SuperUser
Jul 31, 2025 9:05 PM UTC

You can define address objects with wildcard FQDNs then use them in policies.
https://docs.fortinet.com/document/fortigate/7.4.8/administration-guide/217973/using-wildcard-fqdn-addresses-in-firewall-policies

Toshi

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024