Support

Admin Tools

#33246 Block IP Based Upon URL?

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 dlb on Tuesday, 16 June 2020 16:26 CDT

toad78

Is there a way to automatically ban an IP based upon the URL they're accessing? Meaning, a site that I manage is getting hanmmered with WordPress URLs (404 Shield). I've had many attempts in one day! Is there a way to specify automatic blocking of any IP that attempts to access specific URLs. I've read the Admin Tools docs and don't see any workaround.

 

dlb

When you turn on the 404Shield, those "attacks" become subject to the autoban settings that you specified.  That's the purpose of 404Shield, to make the 404 errors banable.

You can't make the stop, and they're harmless against a Joomla! site.  They are annoying.



Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

toad78

Hmmm...okay. I guess I'll have to just enable the 404 Autoban. Thank you.

toad78

Okay. So I went and check my settings and the 'Enable 404 Shield' was already set to 'Yes'. So I don't know why those IPs are not automatically set to be blocked. The '404 Shield' has a list of WordPress based URL directories already. Since my ticket request, I've received 10 more hits of IPs attempting to access WordPress directories but they are not being auto blocked.

Auto-ban settings:

IP blocking: Yes

Block after: 2 attacks in 1 hour

Block for this long: 100000000000 days

Add persistent offenders to the IP Disallow List: Yes

Permanently disallow IP after: 1 automatic IP blocks

Confused.

dlb

Hackers don't use their own IP addresses.  So a permanent ban is a bad idea.  What you're actually banning is an ISP's dynamic IP or a open proxy or a compromised computer.  The ban is somewhat effective against a bot, but it is trivial for a human to bypass it.  If you manage to ban all of the addresses that the hacker has access to you'll just slow your site to a crawl as it checks all those IPs with every pase load. 

Use the autoban to ban the IP for a day to slow down the bots, convert to a permanent ban for IPs that are autobanned multiple times.

You can slow them down, you may even annoy them (I like to think so). But you CAN'T stop them.  The only damage the 404s are doing is to your blood pressure.

Now to your settings, your autoban should trigger when the same IP hits your site twice within an hour.  If the bot is timed to reuse the IP after 61 minutes, it won't trigger the ban.



Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

toad78

So for the Autoban, I've set Block after 2 Attacks in 1 Day.

Block for this long: 1 Day.

Permanently disallow IP after: 1 Auto IP Block.

Soudn about right to slow things down?

dlb

I wouldn't do the permanent ban that quickly.  You only want to do a permanent ban when the IP has already been autobanned multiple times.  That indicates that your hacker "likes" this IP address and it using it over and over.  I'd set it to permanent ban after 3 autobans.



Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

toad78

dlb,

Thank you for the tip. I've made mods to my setup and will keep an eye on it.

Thank you!

dlb

You're welcome!



Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

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!