2025-02-09 00:27:59 +00:00

7 lines
473 B
Plaintext

# Apache ModSecurity rules for RFI
SecRuleEngine On
SecRule REQUEST_URI "!@endsWith\ \.%\{request_headers\.host\}" "id:1043,phase:1,deny,status:403,log,msg:'rfi attack detected'"
SecRule REQUEST_URI "!@endsWith\ \.%\{request_headers\.host\}" "id:1044,phase:1,deny,status:403,log,msg:'rfi attack detected'"
SecRule REQUEST_URI "\^\(\?i:file\|ftps\?\|https\?\)://\(\?:d\{1,3\}\.d\{1,3\}\.d\{1,3\}\.d\{1,3\}\)" "id:1042,phase:1,deny,status:403,log,msg:'rfi attack detected'"