I
I
Ivan Eliseev2020-11-12 13:09:24
Nginx
Ivan Eliseev, 2020-11-12 13:09:24

How to limit traffic in nginx and block via fail2ban?

Hello!

Organized on the basis of seafile file storage, with proxying through nginx
And the task was to limit traffic.
More specifically, in terms of quantity.
According to the following rules
, 10gb per IP per day. If the limit is exceeded - blocking fail2ban, and sending a notification to the mail.

About fail2ban, these are just my assumptions :))
Perhaps you need to block traffic in general at the level of the entire server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2020-11-12
@ky0

This needs to be logged, counted and limited not on the web server, but on the firewall.

V
Vadim, 2020-11-12
@Viji

Rate limits are built into nginx, but I don't know how to limit by gb/day ... look at this article - if you can put it here.
https://leandromoreira.com/2019/01/25/how-to-build...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question