So, you need to enable the ‘Web Application Firewall’ (aka Mod_security) on Plesk 12 and CentOS 6?
I personally had quite a few problems getting this working in the beginning. When I finally got Mod_security installed via plesk and turned on I found that it wasn’t actually blocking anything. One way to test whether Mod_security is working or not is to navigate to http://www.domain.tld/etc/passwd . If you instantly get a 403 Forbidden chances are it’s working fine, if not and you are running Plesk 12 and CentOS 6.X, try the below.
First, find out what RPM packages you have installed (ignore the yum plugin listed). In some cases I had an old 2.7.3 mod_security listed which is no good.
[root@server yum]# rpm --query --all | grep security plesk-modsecurity-configurator-12.0.18-cos6.build1200140724.12.noarch yum-plugin-security-1.1.30-30.el6.noarch plesk-modsecurity-crs-12.0.14-14033112.x86_64 mod_security-2.8.0-24.el6.art.x86_64
Next, remove those packages (excluding the yum one listed).
[root@server yum]# rpm --erase plesk-modsecurity-configurator-12.0.18-cos6.build1200140724.12.noarch plesk-modsecurity-crs-12.0.14-14033112.x86_64 mod_security-2.8.0-24.el6.art.x86_64
Now, manually download the right RPM’s from plesk directly and install them.
[root@server temp]# wget http://autoinstall.plesk.com/PSA_12.0.18/dist-rpm-RedHat-el6-x86_64/opt/hosting/modsecurity/mod_security-2.8.0-14061715.x86_64.rpm [root@server temp]# wget http://autoinstall.plesk.com/PSA_12.0.18/dist-rpm-RedHat-el6-x86_64/opt/hosting/modsecurity/plesk-modsecurity-configurator-12.0.18-rhel6.build1200140724.12.noarch.rpm [root@server temp]# wget http://autoinstall.plesk.com/PSA_12.0.18/dist-rpm-RedHat-el6-x86_64/opt/hosting/modsecurity/plesk-modsecurity-crs-12.0.14-14033111.x86_64.rpm [root@web18 temp]# rpm -i mod_security-2.8.0-14061715.x86_64.rpm plesk-modsecurity-configurator-12.0.18-rhel6.build1200140724.12.noarch.rpm plesk-modsecurity-crs-12.0.14-14033111.x86_64.rpm
If all installed ok, head to plesk and turn ‘ON’ the Web Application Firewall under Tools & settings. If you already had it on, try turning it off and on again 😉
Hope this helps!