Support

Admin Tools

#14074 504 errors

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 nicholas on Sunday, 11 November 2012 11:26 CST

nveinsti
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: (1.5.26)
PHP version: (5.2.17 )
MySQL version: (unknown)
Host: ()
Admin Tools version: (2.2.10)

Description of my issue:

Our site for some reason or other started throwing 504 errors. Our host "siteground.com" senior support detected the flowing error;

Siteground Support

I have investigate the issue and found that it is caused by one of the Joomla plugins called Admintools. When I trace the index.php file and the process which is starting I found that there is a sleep() function executed for 42 seconds:

write(3, "M3DELETE FROM `jos_admintools_ipautoban` WHERE `until`

nicholas
Akeeba Staff
Manager
This is correct. The sleep() is executed when a blocked IP is trying to access your site again. This is done in order to stall hacking scripts attacking your site. The longer the request takes, the more likely is that they will abandon whatever they're trying to do in a shorter period of time. This doesn't have anything to do with 504 errors you might get in legitimate requests.

Legitimate requests are not blocked and this part of Admin Tools' code does not run. Of course, if you do generate a lot of security exceptions for a particular IP (e.g. because of false positives) then it will get auto-banned as per your IP auto-ban settings and this part of Admin Tools code will run for all requests coming from this IP. Even if it didn't, you'd still get a message that this IP is banned (as per your configuration, of course). So the real problem you have to look into is why those IP addresses end up being banned. Look in the Security Exceptions Log and find out why.

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!

nveinsti

Thank you for that explanation.

Issue is this is happening on my ip and i've added it to the whitelist. I checked to see if my ip was being blocked and it did not show in the ban list nor did I get a messaged stating I was banned.

If I reactivate admin tools wham, I get nailed with a 504.

?

nicholas
Akeeba Staff
Manager

You have to make sure that you follow our instructions to the letter:

Go to Components, Admin Tools, Web Application Firewall and click the Exceptions Log button. Delete all records with your own IP address. Then, go back to Web Application Firewall and click on the Auto IP Blocking Administration button. Select the record showing your IP address and click on the Deletebutton to delete the block.

As you can see there are two locations you have to check:

  1. Security Exceptions Log. If your IP is there, it will get auto-banned despite it being in the whitelist.
  2. Auto IP Blocking Administration. If your IP is blocked in there, it will continue receiving 504 errors.

Remember that your IP will never end up automatically in the IP Blacklist. The IP Blacklist is where you can manually put IPs or IP ranges to block. I believe this is where you were looking previously, right?

If this doesn't help, please try disabling the Bad Behaviour integration in Admin Tools' Configure WAF page. Bad Behaviour runs on a hair trigger and it's just too keen to block your request. False positives are the norm and when it does block something it runs its own, very long sleep() command.

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!

nveinsti

You are that man :) Thank you very much as I had did all except very the auto block - doh

 

While I have you attentionm I have another question. When using GEO blocking some support comes from a country that I have on the GEO block. I add there ip to the whitlist and they are still refused access. What am I doing wrong on this? or should i just not use geo blocking and let the fw just be a guardian?

Thank you so much for your EXPERT coolness :)

 

Kind regards

 

Gary

nicholas
Akeeba Staff
Manager

You are that man :) Thank you very much as I had did all except very the auto block - doh

No worries :) It's the most common mistake when someone tries to unblock himself.

While I have you attentionm I have another question. When using GEO blocking some support comes from a country that I have on the GEO block. I add there ip to the whitlist and they are still refused access. What am I doing wrong on this? or should i just not use geo blocking and let the fw just be a guardian?

It has to do with the order individual features are executed. GeoBlock is the first thing to be executed, long before whitelists are even loaded.

I would recommend turning off the GeoBlock feature. It's really not a security feature. It can stop Joe Average coming from Country X from visiting your site, but that's about it. A clever hacker would just use a free proxy to circumvent this protection. The only reason that feature is still included is that some misguided people swear by it despite my warnings. It doesn't cost me anything to maintain it (the GeoIP library would be included anyway, it's used to determine the country shown in the security exception emails) so I just left it there to mute those misguided, but very vocal users :)

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!

nveinsti

I agree with you, I've had mixed feelings about geo blocking both from a security and seo viewpoint. So, i've taken your advice and turned it off. If I see a bunch of idiots coming from one country persay, well then I'll maybe activate in part for the country in question.

Thanks again for both your expert and quick support. This is what support is all about.

 

Thanks very much again.

nicholas
Akeeba Staff
Manager

You're welcome!

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!