Skip to content
Snippets Groups Projects
Verified Commit 385cbd1d authored by Leonidas Spyropoulos's avatar Leonidas Spyropoulos
Browse files

Merge branch 'aurweb-rate-limit' into 'master'

Rate limit aurweb as archweb

See merge request archlinux/infrastructure!732
parents c8a32ef1 9cae0479
No related branches found
No related tags found
No related merge requests found
filesystem: btrfs
fail2ban_jails:
sshd: true
postfix: false
dovecot: false
nginx_limit_req: true
memcached_socket: "/run/memcached/aurweb.sock"
sshd_enable_includes: true
wireguard_address: 10.0.0.2
......
......@@ -9,6 +9,10 @@ upstream smartgit {
# limit Git requests to block Git DoS attempts.
# # grep aurwebgitlimit /var/log/nginx/aur.archlinux.org/error.log | awk '{ print $14 }' | sort | uniq | sort
limit_req_zone $binary_remote_addr zone=aurwebgitlimit:10m rate=30r/m;
# limit general requests to 20 r/s to block DoS attempts.
limit_req_zone $binary_remote_addr zone=aurweblimit:10m rate=20r/s;
limit_req_status 429;
server {
......@@ -131,5 +135,7 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on;
limit_req zone=aurweblimit burst=10 nodelay;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment