Support

Admin Tools

#39943 "Permanently disallow IP" doesn't work

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.3.4
PHP version
8.1
Admin Tools version
7.4.5

Latest post by nicholas on Friday, 08 December 2023 05:28 CST

Malalana

Hello, I have the following settings under Configure WAF -> Auto ban

Add persistent offenders to the IP Disallow List
Yes


Permanently disallow IP after this many automatic blocks
3

 

However "Permanently disallow IP after this many automatic blocks" doesn't seem to have an effect. I have received several auto-bans notifications for a certain IP address, many more than 3 times, over the span of the same day.

Despite this, it seems that the IP always gets unbanned after 15 minutes (which is the set block duration). Even after getting banned more than 3 times, it never remains blocked permanently,it always gets unblocked after 15 minutes.

nicholas
Akeeba Staff
Manager

Admin Tools, Web Application Firewall, Blocked Request Log. Do you see their IP there? If not, go to the Configure WAF page, Logging & Reporting and make sure that Log blocked requests is set to Yes and the reason they get their request blocked is not listed under Do not log these reasons. Automatic IP blocking operates by looking at the Blocked Request Log.

If they do get their IP temporarily blocked you will see it in the Auto Blocked IP Addresses. If there is nothing listed there, check what I told you above, plus whether their IP address is in either the Never block these IPs list in Configure WAF or the Site IP Allow list.

When an IP is blocked temporarily you get records in the Auto IP Blocking History. Make sure the records for that IP address exist. How many records are there? If they are less than what you configured, they will not get permanently blocked.

Also remember that you must set “Disallow site access to IPs in the IP Disallow List” to Yes. Otherwise you are adding IPs to the permanent ban list, without actually blocking those IPs.

Finally, please remember that Joomla! will still process login requests from banned IPs before it allows Admin Tools to block a request (yeah, I know, it's totally backwards!). This means that you will still receive notifications about failed logins from this IP address, but the blocked user only gets the Admin Tools message that they are blocked, regardless of whether the login succeeded or not. There's nothing we can do without changing Joomla's core code, and that is forbidden by the Terms of Service of the Joomla Extensions Directory.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Malalana

Admin Tools, Web Application Firewall, Blocked Request Log. Do you see their IP there?

Yes. The settings you suggested are all already correct.

Multiple entries are logged in the logs over the span of multiple days, and I see certain IPs that have been blocked many more times than 3 times, as shown by the email notifications received.

They get blocked correctly. But they never stay permanently blocked even after surpassing the 3 times treshold, it always gets unblocked after 15 mins.

For example, check this IP in the "Auto IP Blocking History": https://i.imgur.com/ovUYMLr.png

As you can see, it's there many more times than 3.

Yet, the IP is not in the "Auto Blocked IP Addresses" currently. All entries in here expire after 15 mins regardless of the 3-times setting.

It also seems that the blocked requests from this example IP are not due to failed login attempts, so we can exclude the possible reason you mentioned.

 

nicholas
Akeeba Staff
Manager

I now understand what is going on and why I could not reproduce this issue.

We are using automated tests which apply the configuration directly to the database. These tests passed just fine.

However, when I tried reproducing your issue manually, I saw that I indeed had that problem.

Checking the configuration generated by the test and the configuration generated manually the problem became apparent. I had made a typo in the Configure WAF form. Therefore, the setting that you were applying had no effect.

Please install the latest dev release from https://www.akeeba.com/download/admin-tools-professional/7-4-5-dev202312080857-rev4bee9895.html. Now go to the Configure WAF page in Admin Tools. You will see that the “Add persistent offenders to the IP Disallow List” setting is disabled. Enable it. Now the IPs are getting permanently auto-banned as they should.

Note: we will release this dev release as the stable version 7.4.5 next week. It's safe to use.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Malalana

Ah I see! Surprised this wasn't reported earlier by someone else :)

Thanks for the fixed version, I'll monitor it in the next few days and ensure that repeated offenders get banned.

Best,

Andy

nicholas
Akeeba Staff
Manager

I am surprised too. It appears to be there since I rewrote Admin Tools for Joomla! 4, more than two years earlier. I guess people were not paying much attention? It happens. It's rare, but it does happen.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!