G
G
grade242019-09-29 16:28:28
ubuntu
grade24, 2019-09-29 16:28:28

How to block ip using file2ban?

Friends, help me set up ip blocking using file2ban. How to block constant activity (on the screen), each request is unique, there are many requests for different channels channels from one ip.
5d90b174ee7b9099907235.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AUser0, 2019-09-29
@AUser0

The problem is that fail2ban responds to a message about some ERROR, an abnormal situation.
And you don’t have any errors either, there is a regular connection to the stream, and then a regular disconnection from the stream.
And fail2ban will not be able to respond to a regular connection-disconnection, otherwise it will ban all connections altogether, totally...
Alternatively, you need to write a script (in an accessible language), run every minute/two/three/five, parse the log, find such connections, check for already banned, and ban. Profit!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question