cgoncalves / rpms / mod_security

Forked from rpms/mod_security 4 years ago
Clone

Blame SOURCES/mod_security.conf

b41798
<IfModule mod_security2.c>
b41798
    # ModSecurity Core Rules Set configuration
b41798
	Include modsecurity.d/*.conf
b41798
	Include modsecurity.d/activated_rules/*.conf
b41798
    
b41798
    # Default recommended configuration
b41798
    SecRuleEngine On
b41798
    SecRequestBodyAccess On
b41798
    SecRule REQUEST_HEADERS:Content-Type "text/xml" \
b41798
         "id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
b41798
    SecRequestBodyLimit 13107200
b41798
    SecRequestBodyNoFilesLimit 131072
b41798
    SecRequestBodyInMemoryLimit 131072
b41798
    SecRequestBodyLimitAction Reject
b41798
    SecRule REQBODY_ERROR "!@eq 0" \
b41798
    "id:'200001', phase:2,t:none,log,deny,status:400,msg:'Failed to parse request body.',logdata:'%{reqbody_error_msg}',severity:2"
b41798
    SecRule MULTIPART_STRICT_ERROR "!@eq 0" \
b41798
    "id:'200002',phase:2,t:none,log,deny,status:44,msg:'Multipart request body \
b41798
    failed strict validation: \
b41798
    PE %{REQBODY_PROCESSOR_ERROR}, \
b41798
    BQ %{MULTIPART_BOUNDARY_QUOTED}, \
b41798
    BW %{MULTIPART_BOUNDARY_WHITESPACE}, \
b41798
    DB %{MULTIPART_DATA_BEFORE}, \
b41798
    DA %{MULTIPART_DATA_AFTER}, \
b41798
    HF %{MULTIPART_HEADER_FOLDING}, \
b41798
    LF %{MULTIPART_LF_LINE}, \
b41798
    SM %{MULTIPART_MISSING_SEMICOLON}, \
b41798
    IQ %{MULTIPART_INVALID_QUOTING}, \
b41798
    IP %{MULTIPART_INVALID_PART}, \
b41798
    IH %{MULTIPART_INVALID_HEADER_FOLDING}, \
b41798
    FL %{MULTIPART_FILE_LIMIT_EXCEEDED}'"
b41798
b41798
    SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \
b41798
    "id:'200003',phase:2,t:none,log,deny,status:44,msg:'Multipart parser detected a possible unmatched boundary.'"
b41798
b41798
    SecPcreMatchLimit 1000
b41798
    SecPcreMatchLimitRecursion 1000
b41798
b41798
    SecRule TX:/^MSC_/ "!@streq 0" \
b41798
            "id:'200004',phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'"
b41798
b41798
    SecResponseBodyAccess Off
b41798
    SecDebugLog /var/log/httpd/modsec_debug.log
b41798
    SecDebugLogLevel 0
b41798
    SecAuditEngine RelevantOnly
b41798
    SecAuditLogRelevantStatus "^(?:5|4(?!04))"
b41798
    SecAuditLogParts ABIJDEFHZ
b41798
    SecAuditLogType Serial
b41798
    SecAuditLog /var/log/httpd/modsec_audit.log
b41798
    SecArgumentSeparator &
b41798
    SecCookieFormat 0
b41798
    SecTmpDir /var/lib/mod_security
b41798
    SecDataDir /var/lib/mod_security
b41798
</IfModule>