我如何在 modsecurity 中阻止这些请求:
12.54.87.55:443
https://12.54.87.55
尝试过
SecRule REQUEST_URI "12.54.87.55:443" phase:1,id:1008,log,deny,status:403
但似乎不起作用。
我想阻止所有主机标头为数字 IP 地址的请求
答案1
SecRule REQUEST_HEADERS:Host "^[\d\.]+$" "phase:1,t:none,block,msg:'Host is an IP address'"