logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: how to block
Author
Doug22



Joined: 02 Jun 2013
Posts: 57
Location: Houston TX

PostPosted: Wed 10 Apr '24 17:24    Post subject: how to block Reply with quote

I have MANY lines like this in my access log. xyz123 is beating on my website. How do I block in .htaccess? As far as I can tell xyz123 isn't a "User Agent".

11.111.111.111 - - [10/Apr/2024:05:00:40 -0100] "GET /myfile HTTP/1.1" 200 45217 "-" "xyz123" x.net 22.222.22.222
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sun 28 Apr '24 20:50    Post subject: Reply with quote

You can use
Code:

Require not ip 1.2.3.4


or block the user agent

Code:

<If "%{HTTP_USER_AGENT} == 'xyz123'">
    Require all denied
</If>


For more options see https://httpd.apache.org/docs/2.4/howto/access.html
Back to top


Reply to topic   Topic: how to block View previous topic :: View next topic
Post new topic   Forum Index -> Apache