Answer the question
In order to leave comments, you need to log in
How to block too frequent requests from one IP?
Hi all!
Recently, I have been observing attempts to hack the site. These attempts are certainly unsuccessful, but still they load the server. It looks like they are robots. A little blunt robots, I would say. They get a 404 response (the real response is HTTP status = 404 Not Found), but they still pound every second.
"Dolted" mainly from the IP of Germany (server Hetzner), but there were also similar attempts from the IP addresses of France, Ukraine and Moscow.
Last time 40 minutes until I blocked.
At the moment I'm blocking (DROP) access to these IPs through FirewallD (prescribing each IP).
This is not a very pretty way. I would like IPs to be blocked in the "atom" (maybe even specific servers or computers). It is advisable to block for a certain period.
Maybe someone did something similar.
Server:
CentOS Linux release 7.2.1511 (Core)
nginx 1.10.1
FirewallD 0.3.9
ZYZH
I would not want to use a web server (nginx) or "sew up" into the logic of a web application. There will be extra loads on them.
Answer the question
In order to leave comments, you need to log in
Here https://habrahabr.ru/post/128526/#comment_4251423 there is a way, but somehow I don’t like it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question