How do I install ModSecurity OWASP CRS Plugins in Directadmin?

webbasica

Verified User
Joined
Feb 21, 2005
Messages
71
In Mod Security, the OWASP CRS 4.x have plugins (formerly "exclusion packages"). I'm trying to enable them in my custom modsecurity conf file for Custom Build. Since I'm using OpenLiteSpeed, this is the file:
/usr/local/directadmin/custombuild/custom/openlitespeed/conf/httpd-modsecurity.conf

According to the CRS documentation, it's as simple as creating a directory, and adding he rule files:

Code:
Include crs/crs-setup.conf
 
Include crs/plugins/*-config.conf
Include crs/plugins/*-before.conf
 
Include crs/rules/*.conf
 
Include crs/plugins/*-after.conf

However, I don't know how to accomplish this using the Custom Build conf file (httpd-modsecurity.conf)

Code:
# Default recommended configuration
SecRuleEngine On
SecRequestBodyAccess On
SecDefaultAction "phase:2,deny,log,status:406"
SecRequestBodyLimitAction ProcessPartial
SecResponseBodyLimitAction ProcessPartial
SecRequestBodyLimit 13107200
SecRequestBodyNoFilesLimit 131072
SecAuditLogFormat JSON

SecPcreMatchLimit 250000
SecPcreMatchLimitRecursion 250000

SecCollectionTimeout 600

SecDebugLog /var/log/httpd/modsec_debug.log
SecDebugLogLevel 0
SecAuditEngine RelevantOnly
SecAuditLog /var/log/httpd/modsec_audit.log
SecUploadDir /tmp
SecTmpDir /tmp
SecDataDir /tmp
SecTmpSaveUploadedFiles on

# ModSecurity Core Rules Set and Local configuration
Include /etc/modsecurity.d/*.conf.main
Include /etc/modsecurity.d/*.conf

Has anyone installed OWASP CRS plugins in Directadmin?
 
I have exactly the same question (for Apache webserver). For now I've pinned my DA install to keep OWASP v3 because of this.

With OWASP v3 I have some custom settings in /usr/local/directadmin/custombuild/custom/modsecurity/conf/ that get included every time the httpd confs are rewritten.

With OWASP v4 it's unclear for me if this will still work since, with default settings, it would require overwriting directories?
Since the build script is now included in the DA binary it's impossible to find out without just testing and I don't want to try this on my live server....

Some kind of "how to" from DA would be nice...
 
Back
Top