Description
This article describes how to list/remove a banned IP from the list on a FortiGate.
Scope
Reasons why an IP address may have been quarantined:
All sessions started by users or IP addresses on the Banned User list are blocked until the user or IP address is removed from the list or reaches it's expiry.
Viewing the Banned User List:
In v5.2 and later, the following command is used:
FGT# diagnose firewall ip_host list
On v7.0 and v6.0 following command is used:
FGT# diagnose user quarantine list
From v7.2 moving forward, the command to list the banned IPs from the CLI is as follows:
FGT# diagnose user banned-ip list
The example output looks like this:
FGT# diagnose user banned-ip list
src-ip-addr created expires cause
192.168.3.110 Wed Mar 4 15:22:24 2025 Wed Mar 4 15:24:24 2015 DLP
192.168.3.111 Wed Mar 4 15:23:23 2025 Wed Mar 4 16:23:23 2015 IPS
Explanation of each field:
Related options:
In order to add an entry, see Technical Tip: How to ban or quarantine an IP with FortiView and CLI in FortiGate.
To delete an entry, see Technical Tip: Remove Banned IP.
To view the number of entries in the list:
FGT# diagnose user banned-ip stat
iph_size=2
Run the following command to clear the whole list:
FGT# diagnose user banned-ip clear
IP ban using security profiles:
Configure an antivirus profile:
FGT# config antivirus profile
edit <name>
config nac-quar
set infected quar-src-ip
set expiry <duration>
end
View the banned IP address:
FGT# diagnose user banned-ip list
src-ip-addr created expires cause
172.16.200.55 Wed Jan 17 13:06:05 2024 Wed Jan 17 13:08:05 2024 AV
Configure the application control profile:
FGT# config application list
edit <name>
config entries
edit <id>
set quarantine attacker
set quarantine-expiry <duration>
next
end
next
end
View the banned IP address:
FGT# diagnose user banned-ip list
src-ip-addr created expires cause 172.16.200.55 Thu Jan 18 07:17:13 2024 Thu Jan 18 07:22:13 2024 APP
Configure the DLP profile:
FGT# config dlp profile
edit <name>
config rule
edit <id>
set proto <protocols>
set action quarantine-ip
set expiry <duration>
next
end
next
end
View the banned IP address:
FGT# diagnose user banned-ip list
src-ip-addr created expires cause 172.16.200.55 Thu Jan 18 07:03:03 2024 Thu Jan 18 07:05:03 2024 DLP
Configure the IPS profile:
FGT# config ips sensor
edit <name>
config entries
edit <id>
set quarantine attacker
set quarantine-expiry <duration>
next
end
end
View the banned IP address:
FGT## diagnose user banned-ip list
src-ip-addr created expires cause
172.16.200.55 Thu Jan 18 06:42:06 2024 Thu Jan 18 06:44:06 2024 IPS
Related article:
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.