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