ansible-sample/roles/apache/files/modsecurity/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
2026-09-23 14:26:05 +09:00

23 lines
702 B
Plaintext

# -------------------------------------------------------------
# Wordpress
# -------------------------------------------------------------
# Wordpressのログイン失敗を引っかける
# - Wordpress側にも以下の設定が必要
# RewriteEngine On
# RewriteRule ^/([_0-9a-zA-Z-]+/)?(wp-login\.php)$ /wp-login.php [PT,L]
SecRule SERVER_NAME "@rx ^wp\.example\.net$" \
"id:1000202,\
phase:3,\
deny,\
status:403,\
log,\
auditlog,\
msg:'Wordpress Login Failed',\
severity:'CRITICAL',\
chain"
SecRule REQUEST_METHOD "@streq POST" \
"chain"
SecRule REQUEST_URI "@endswith /wp-login.php" \
"chain"
SecRule RESPONSE_STATUS "@eq 200"