cgoncalves / rpms / mod_security

Forked from rpms/mod_security 4 years ago
Clone

Blame SOURCES/mod_security.conf

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