So you recommend removing Comodo WAF plugin in WHM if we enable it as a vendor and use your rules trough cPanel?
Does this release make it possible for users with Mod Security icon in cPanel be able to turn off/on mod_security on their account?
No, because CWAF plugin is much more functional. It’s just another way for using Comodo protection rules embedded into cPanel since version 1.48.
Yes, cPanel ModSecurity implementation allow users to turn on/off mod_security for their selected domains. So if Comodo rules enabled as vendor, user can turn rules off.
Uninstall of plugin will restore your ModSecurity config (Use cd /var/cpanel/cwaf/scripts/ && ./uninstall_cwaf.sh).
This will restore Vendors functionality.
So is it required to have the WAF Cpanel plugin installed in order to use the ModSecurity Vendor setup or does it just add a few nice extra features? I installed the Vendor and all works great. Just wondering if I need WAF as well since I use COnfigServer Firewall on this machine. Also, will updates happen automatically I assume for the Vendor rules?
You don’t need CWAF plugin to use the ModSecurity Vendor. Moreover it’s impossible to use Comodo rules as ModSecurity Vendor with CWAF plugin installed because it overwrites mod_security config.
We need to choose either Vendor or Plugin. So I guess ModSecurity Vendor plus ConfigServer Firewall will be enough
Vendor rules updated automatically once a day by cPanel.
Seems Comodo ModSecurity rules is not set up correctly.
Please check your ModSecurity config.
What is in /usr/local/apache/conf/modsec2.conf ?
What content of /usr/local/apache/conf/modsec2.cpanel.conf ?
LoadFile /opt/xml2/lib/libxml2.so
# LoadFile /opt/lua/lib/liblua.so
LoadModule security2_module modules/mod_security2.so
<IfModule mod_security2.c>
# See http://www.modsecurity.org/documentation/ModSecurity-Migration-Matrix.pdf
# "Add the rules that will do exactly the same as the directives"
# SecFilterCheckURLEncoding On
# SecFilterForceByteRange 0 255
<IfModule mod_ruid2.c>
SecAuditLogStorageDir /usr/local/apache/logs/modsec_audit
SecAuditLogType Concurrent
</IfModule>
<IfModule itk.c>
SecAuditLogStorageDir /usr/local/apache/logs/modsec_audit
SecAuditLogType Concurrent
</IfModule>
SecAuditLog logs/modsec_audit.log
SecDebugLog logs/modsec_debug_log
SecDebugLogLevel 0
SecDefaultAction "phase:2,deny,log,status:406"
Include "/usr/local/apache/conf/modsec2.user.conf"
Include "/usr/local/apache/conf/modsec2.cpanel.conf"
</IfModule>
/usr/local/apache/conf/modsec2.cpanel.conf ?
################################################################
## This file is automatically generated from the data kept in ##
## /var/cpanel/modsec_cpanel_conf_datastore. ##
## ##
## Manual changes made directly here will be lost when the ##
## file is regenerated. ##
################################################################
##
## ModSecurity fixed global configuration directives
##
SecDataDir "/var/cpanel/secdatadir"
##
## ModSecurity manageable global configuration directives
##
SecAuditEngine "RelevantOnly"
SecHttpBlKey "jcemzxnjvmvw"
SecRuleEngine "On"
##
## ModSecurity configuration file includes:
##
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/categories.conf"
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/cwaf_01.conf"
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/cwaf_02.conf"
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/cwaf_03.conf"
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/cwaf_04.conf"
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/cwaf_05.conf"
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/cwaf_06.conf"
Include "/usr/local/apache/conf/modsec_vendor_configs/comodo-apache/cwaf_07.conf"
##
## ModSecurity disabled rules:
##
Yes, we know about this limitation. However despite on this issue rules loaded and working correctly.
cPanel doesn’t fully support our vendor names: “comodo-apache” and “comodo-litespeed”, so probably we’ll need to change them. In the near weeks we plan to update our cPanel support to enable feedback reporting and fixing of this issue.