Mod_Security blocking WordPress logins

mehdix92

Member
Jun 12, 2018
10
1
3
Algeria
cPanel Access Level
Root Administrator
Hello,

I'm currently experiencing issues with CSF in the following cases :

  1. - Mod_Security rules give error 406 wordpress when trying to login through wp-admin - Disabling Mod_security on the Website's Cpanel solves the issues but is insecure.

  2. Rules for SMTP are way too strict resulting in an impossibility to connect with outlook - Adding IP to whitelist CSF solves the issue.


Any solutions please ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello @mehdix92,

1. Can you let us know an example of the output to /usr/local/apache/logs/modsec_audit.log when the WordPress login failed? This should help to narrow down the specific rule that blocked the login.

2. Can you let us know the specific error message or issue you encountered with Outlook before whitelisting the IP address in your firewall? How were you reproducing the issue, and what operating system and Outlook version were used on the computer you tested with?

Thank you.
 

mehdix92

Member
Jun 12, 2018
10
1
3
Algeria
cPanel Access Level
Root Administrator
This is a portion of it :

ModSecurity: Access denied with code 406 (phase 2). Pattern match "/wp-admin/css/.*\\\\\\\\.php" at REQUEST_URI. [file "remote server"] [line "-1"] [id "430027"] [msg "Malware.Expert - request_uri: Wordpress - prevent PHP files from executing"] [hostname "domainexample.com"] [uri "/wp-admin/css/colors/blue/Marvins.php"] [unique_id "Wx-UYRBXDENGcxXBfEJLaQAAAQM"]
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463