I have the latest LiteSpeed, latest CPanel and mod_sec 2.7x installed via cpanel/easyapache.
mod_security is only partially working. Simple useragents are blocked, but more complex UAs are not. For example, these work:
SecRule HTTP_USER_AGENT "ati2qs" "id:330001,rev:1,phase:2,t:none,t:lowercase,status:403,log"
SecRule HTTP_USER_AGENT "rarely used" "id:330170,rev:1,phase:2,t:none,t:lowercase,status:403,log"
But these do not:
SecRule HTTP_USER_AGENT "mail.ru_bot/2.0" "id:330121,rev:1,phase:2,t:none,t:lowercase,status:403,log"
SecRule HTTP_USER_AGENT "mj12bot/v1.4.4" "id:330123,rev:1,phase:2,t:none,t:lowercase,status:403,log"
Nor does it work replacing HTTP_USER_AGENT with REQUEST_HEADERS:User-Agent.
SecRule REQUEST_HEADERS:User-Agent "mail.ru_bot/2.0" "id:330121,rev:1,phase:2,t:none,t:lowercase,status:403,log"
SecRule REQUEST_HEADERS:User-Agent "mj12bot/v1.4.4" "id:330123,rev:1,phase:2,t:none,t:lowercase,status:403,log"
What am I missing?
mod_security is only partially working. Simple useragents are blocked, but more complex UAs are not. For example, these work:
SecRule HTTP_USER_AGENT "ati2qs" "id:330001,rev:1,phase:2,t:none,t:lowercase,status:403,log"
SecRule HTTP_USER_AGENT "rarely used" "id:330170,rev:1,phase:2,t:none,t:lowercase,status:403,log"
But these do not:
SecRule HTTP_USER_AGENT "mail.ru_bot/2.0" "id:330121,rev:1,phase:2,t:none,t:lowercase,status:403,log"
SecRule HTTP_USER_AGENT "mj12bot/v1.4.4" "id:330123,rev:1,phase:2,t:none,t:lowercase,status:403,log"
Nor does it work replacing HTTP_USER_AGENT with REQUEST_HEADERS:User-Agent.
SecRule REQUEST_HEADERS:User-Agent "mail.ru_bot/2.0" "id:330121,rev:1,phase:2,t:none,t:lowercase,status:403,log"
SecRule REQUEST_HEADERS:User-Agent "mj12bot/v1.4.4" "id:330123,rev:1,phase:2,t:none,t:lowercase,status:403,log"
What am I missing?