How to Block Unwanted User-Agent & Referrers in Apache

TheMask

Verified User
Joined
Jan 20, 2011
Messages
141
18.163.215.233 - - [24/Jan/2022:12:54:57 +0300] "POST /admin/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0" "S-port: 39608"

I want to block entries like this. how can i do that

<Location ~ "/admin/">
Order allow,deny
Deny from all
ErrorDocument 403 "Sorry, you are not allowed to view this page!"
</Location>

this is not a good options. maybe "Ubuntu" or "Firefox/62.0" word good for blocking...
 
Top