Skip to content

4.5 Configuration Auto Unblock IP Minutes

Gurdeep Singh (Guru) edited this page Aug 10, 2024 · 1 revision

Configuration - Auto Unblock IP Minutes

Let's take a scenario. You have integrated PHPFirewall in your authentication system, where you have defined that if a user enters incorrect password, the system creates a new filter type monitor for that IP. And if the user enters incorrect password more than 3 times, your system will switch that filter to block state. So, the next time the same user refreshes the page, they will get a 404 or whatever your incorrect password policy you have configured in your application. You can set auto unblock the IP address and PHPFirewall will change the filter to allow state if the user waits for the set amount of minutes.

This feature of auto unblocking of IP can be set via configuration.

Via CLI

admin@phpterminal:firewall(config)# set auto unblock 10

SET AUTO UNBLOCK 10 OUTPUT
...
FIREWALL DETAILS > AUTO_UNBLOCK_IP_MINUTES : 10
...

admin@phpterminal:firewall(config)#

Via PHP Firewall Class

$firewall->setConfigAutoUnblockIpMinutes(10);

NOTE: Setting the time to "0" will disable this feature.