1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/fail2ban/templates/nginx-limit-req.jail.j2
Jelle van der Waa 314aa3556e
Rate limit archlinux.org and fail2ban abusers
Add a default rate limit for 20 req/s for the uwsgi endpoint and
automatically ban users who reach this limit. The nginx-limit-req rule
does not ban users who reach the rss limit as these are not likely DoS
attempts.
2021-07-11 21:10:38 +02:00

16 lines
308 B
Django/Jinja

#
# {{ansible_managed}}
#
[nginx-limit-req]
enabled = true
filter = nginx-limit-req
action = iptables-multiport[name=ReqLimit, port="http,https", protocol=tcp]
logpath = /var/log/nginx/*/error.log
findtime = 5min
bantime = 1hours
maxretry = 10
# Do not fail2ban archweb's rss limit.
ignoreregex = rsslimit