Nginx Layer 7 Protect [Rate Limit]

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
We Love TESLA ⚡️
Kurucu
Katılım
13 Eyl 2015
Mesajlar
1,301
Çözümler
16
Tepki puanı
4,569
Ödüller
16
Yaş
95
10 HİZMET YILI
1-
Kod:
cd /etc/nginx
nano nginx.conf


Find http { and paste the lines as below.

Kod:
# MHDOS
    limit_conn_zone $binary_remote_addr zone=conn_limit_per_ip:10m;
    limit_req_zone $binary_remote_addr zone=req_limit_per_ip:10m rate=7r/s;

# MHDOS
    limit_conn_status 403;
    limit_req_status 403;

hDfGlg.png


2-Now open your virtual host file located in /etc/nginx/conf.d. Replace yourdomainname.com.conf with your actual domain config file.


Kod:
cd /etc/nginx/conf.d
nano yourdomain.com.conf

Find location / { and above that add the lines below

Kod:
   # MHDOS

         limit_conn conn_limit_per_ip 10;
         limit_req zone=req_limit_per_ip burst=5 nodelay;

         client_body_timeout 5s;
         client_header_timeout 5s;



cPZxgY.png


3- Restart NGINX
Kod:
service nginx restart
 
Son düzenleme:
potential zero
Ultra Üye
Katılım
9 Ocak 2018
Mesajlar
1,557
Çözümler
2
Tepki puanı
341
Ödüller
9
Yaş
23
8 HİZMET YILI
Teşekkür ederiz Caus
 
Seçkin Üye
Katılım
20 Haz 2020
Mesajlar
298
Çözümler
2
Tepki puanı
3
Ödüller
3
Sosyal
5 HİZMET YILI
  1. Inherent Protection of the NGINX Event‑Driven Architecture. ...
  2. Limiting the Rate of Requests. ...
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Benzer Konular

Üst