Description
This article describes how to configure a Web filter in NGFW policy mode and how to use it in security policies.
Scope
FortiGate.
Solution
Only Static URL Filter options can be configured.
In Policy Base Mode:
To create a web filter profile when the FortiGate is in policy mode from GUI.
To apply a web filter profile in a security policy from GUI.
If Central Nat is enabled, create it. select Policy & Objects -> Central SNAT.
CLI commands:
config webfilter urlfilter
edit 1
set name "Auto-webfilter-urlfilter_bwv7i1r83"
config entries
edit 1
set url "*.bot*.com"
set type wildcard
set action block
next
end
next
end
config webfilter content
edit 1
set name "Auto-webfilter-content_mqqyssuxd"
config entries
edit "gambling"
set status enable
next
edit "news"
set status enable
next
edit "test"
set status enable
next
edit "example"
set status enable
next
end
next
end
config webfilter profile
edit "webfilter-demo"
set options block-invalid-url
config web
set bword-table 1
set urlfilter-table 1
set blacklist enable
end
next
end
config firewall security-policy
edit 1
set name "policy-demo-1"
set srcintf "port2"
set dstintf "port1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set webfilter-profile "webfilter-demo"
set app-category 15 25
next
end
config firewall policy
edit 1
set name "ssl-inspection-policy-demo"
set srcintf "port2"
set dstintf "port1"
set srcaddr "all"
set dstaddr "all"
set service "ALL"
set ssl-ssh-profile "certificate-inspection"
next
end
config firewall central-snat-map
edit 1
set srcintf "port1"
set dstintf "port2"
set orig-addr "all"
set dst-addr "all"
next
end
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 2025 Fortinet, Inc. All Rights Reserved.