Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. <IfModule mod_security2.c>
  2. # Default recommended configuration
  3. SecRuleEngine Off
  4. SecRequestBodyAccess On
  5. SecRule REQUEST_HEADERS:Content-Type "text/xml" \
  6. "id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
  7. SecRequestBodyLimit 13107200
  8. SecRequestBodyNoFilesLimit 131072
  9. SecRequestBodyInMemoryLimit 131072
  10. SecRequestBodyLimitAction Reject
  11. SecRule REQBODY_ERROR "!@eq 0" \
  12. "id:'200001', phase:2,t:none,log,deny,status:400,msg:'Failed to parse request body.',logdata:'%{reqbody_error_msg}',severity:2"
  13. SecRule MULTIPART_STRICT_ERROR "!@eq 0" \
  14. "id:'200002',phase:2,t:none,log,deny,status:44,msg:'Multipart request body \
  15. failed strict validation: \
  16. PE %{REQBODY_PROCESSOR_ERROR}, \
  17. BQ %{MULTIPART_BOUNDARY_QUOTED}, \
  18. BW %{MULTIPART_BOUNDARY_WHITESPACE}, \
  19. DB %{MULTIPART_DATA_BEFORE}, \
  20. DA %{MULTIPART_DATA_AFTER}, \
  21. HF %{MULTIPART_HEADER_FOLDING}, \
  22. LF %{MULTIPART_LF_LINE}, \
  23. SM %{MULTIPART_MISSING_SEMICOLON}, \
  24. IQ %{MULTIPART_INVALID_QUOTING}, \
  25. IP %{MULTIPART_INVALID_PART}, \
  26. IH %{MULTIPART_INVALID_HEADER_FOLDING}, \
  27. FL %{MULTIPART_FILE_LIMIT_EXCEEDED}'"
  28.  
  29. SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \
  30. "id:'200003',phase:2,t:none,log,deny,status:44,msg:'Multipart parser detected a possible unmatched boundary.'"
  31.  
  32. SecPcreMatchLimit 1000
  33. SecPcreMatchLimitRecursion 1000
  34.  
  35. SecRule TX:/^MSC_/ "!@streq 0" \
  36. "id:'200004',phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'"
  37.  
  38. SecResponseBodyAccess Off
  39. SecDebugLog /var/log/httpd/modsec_debug.log
  40. SecDebugLogLevel 0
  41. SecAuditEngine RelevantOnly
  42. SecAuditLogRelevantStatus "^(?:5|4(?!04))"
  43. SecAuditLogParts ABIJDEFHZ
  44. SecAuditLogType Serial
  45. SecAuditLog /var/log/httpd/modsec_audit.log
  46. SecArgumentSeparator &
  47. SecCookieFormat 0
  48. SecTmpDir /var/lib/mod_security
  49. SecDataDir /var/lib/mod_security
  50. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement