Support

Admin Tools

#31256 Gateway timeout when accessing admintools

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
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Saturday, 03 August 2019 17:17 CDT

dwreski
Hi,
This started as a support request, but I figured out the problem, so thought I would report what happened.

I've been using admintools for maybe three months, including the WAF to block attempts to access the admin section of our site. Last I looked a week or so ago, there were about 1200 entries. We receive emails every few minutes with more unauthorized attempts being blocked.

I started looking through the admintools tables, and noticed several were quite large. _admintools_ipautobanhistory had 8000 entries and _admintools_log had nearly 350,000 entries. This is apparently what caused the gateway timeout error.

Deleting the contents of the log fixed it. I also deleted the ipautobanhistory entries.

Given we've changed our /administrator/index.php to use the "Administrator secret URL parameter", is it really necessary to also use "IP blocking of repeat offenders" and the "request filtering" options?

What are the performance implications of using these additional blocking methods?

nicholas
Akeeba Staff
Manager
No, you can't get a gateway timeout from that. These entries are not loaded all at once in memory. We only insert records in those tables and then query the count of rows matching certain criteria when a security exception occurs. Most likely you tried accessing the Admin Tools' Security Exceptions Log page having set up Joomla's default list limit to 100 or more items in which case it is trying to load lots of records at once and you may indeed run out of memory (which causes a PHP error which causes the gateway timeout). The correct solution is using a smaller default list limit. 20 or 50 is a safe number and, frankly, anything more than that is not even practical to begin with.

I would recommend doing an IP auto-block with a bit more relaxed settings: auto-block after 3 security exceptions in 1 minute and block them for 15 minutes.

Regarding repeat offenders, I am against blacklisting IPs. This is a feature other clients have asked for. I would recommend disabling it.

Also edit the System - Admin Tools plugin configuration and set it to keep at most 200 entries. These are enough to auto-ban IPs automatically and temporarily using the parameters I explained.

Regarding whether you need the request filtering options, yes, you do need them. That's the entire point of Admin Tools, protecting you from malicious requests.

The performance implications are negligible. A successful requests gets delayed by approximately 0.1 seconds when all Admin Tools web application firewall features are turned on. A blocked request uses up even less resources than a full page load since it gets blocked very early in the lifetime of Joomla (the earliest event possible, onAfterIntialise), before any components or modules have been loaded.

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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!