cgoncalves / rpms / mod_security

Forked from rpms/mod_security 4 years ago
Clone

Blame SOURCES/mod_security.conf

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