Created on
09-20-2006
12:00 AM
Edited on
01-14-2026
12:35 AM
By
Jean-Philippe_P
| Description | This article describes how to block an IP address. |
| Scope |
FortiGate. |
| Solution |
To block an IP address, create an address entry and create a firewall policy to block the address.
Create an Address Object.
Note that if blocking an internal IP address, set the netmask to 255.255.255.255, or /32. Otherwise, it could block the entire subnet.
CLI commands:
set subnet 172.16.1.30 255.255.255.255 next
Create a Firewall Policy.
Creating Firewall policy from CLI use below commands:
config firewall policy set action deny <----- Action to deny logs.
Note:
FortiGate checks firewall policies in order, starting from the top of the list. As soon as it finds a match for the traffic, it uses that policy and stops looking further. Therefore, it is recommended that the blocking policy be placed above any existing allow policy that matches the same traffic.
|
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 2026 Fortinet, Inc. All Rights Reserved.