New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Custom modsec rules

Started by Israeru49, January 11, 2023, 08:04:00 PM

Previous topic - Next topic

Israeru49

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

overseer

#1
Have you considered blocking at the CSF/LFD firewall level instead of mod_security?

Otherwise, the answer to your question is here. File for custom directives is:
nano /usr/local/apache/modsecurity-cwaf/custom_user.conf