Block IP if trying to access specific url?

Post Reply
drizion
Junior Member
Posts: 1
Joined: 12 Apr 2020, 10:18

Block IP if trying to access specific url?

Post by drizion »

Hello is it possible to block an IP at CSF level if that IP tries to access a url pattern like "anydomain.com/includes/folder/restricted.php"

thank you in advance
Sergio
Junior Member
Posts: 1712
Joined: 12 Dec 2006, 14:56

Re: Block IP if trying to access specific url?

Post by Sergio »

You can do this with ModSecurity.

If you have the COMMODO rules that Chirpy installs in our servers when CSF is installed, do the following:
1. Go to /etc/apache2/conf.d/modsec_vendor_configs/comodo_apache/
2. Modify the file userdata_bl_URLs adding in it the URL that you want to block. (Follow the instructions inside that file).

For more info, see:
https://forums.comodo.com/free-modsecur ... 423.0.html

Sergio
Post Reply