Control Web Panel

Security => Mod_Security => Topic started by: Israeru49 on January 11, 2023, 08:04:00 PM

Title: Custom modsec rules
Post by: Israeru49 on January 11, 2023, 08:04:00 PM
Hi
I need to know how to put a custom rule in CWP account for blocking some countries using modsec

Where I need to add the rules instructions? In which file?

Greetings
Title: Re: Custom modsec rules
Post by: overseer on January 14, 2023, 11:59:47 PM
Have you considered blocking at the CSF/LFD firewall level instead of mod_security?

Otherwise, the answer to your question is here. (https://bobcares.com/blog/block-country-using-modsecurity-rule/) File for custom directives is:
Code: [Select]
nano /usr/local/apache/modsecurity-cwaf/custom_user.conf