[HOW TO] Auth Server Load Balancing [FOR DDOS]

Avatar utilizator
GianiVersace
Nivel 1

Nivel 1
Mesaje: 123
Membru din: 29 Aug 2023, 20:06
Server: Nereide2
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 14  
Medalii

Tutorial realizat de Colossus, sal.


Install nginx:

Cod: Selectaţi tot

pkg install nginx

enable nginx:

Cod: Selectaţi tot

sysrc nginx_enable="YES"

open auth core CONFIG and add:

Cod: Selectaţi tot

BIND_IP: 127.0.0.1

open /usr/local/etc/nginx/nginx.conf and use this configuration:

Cod: Selectaţi tot

load_module '/usr/local/libexec/nginx/ngx_stream_module.so';
worker_processes auto;
events {
    worker_connections 5000;
    multi_accept on;
}
stream {
    upstream auth_servers {
        server 127.0.0.1:11002;
        server 127.0.0.1:11003;
    }
    server {
        listen 11000;
        proxy_pass auth_servers;
    }
}

Port 11002 and 11003 are the auth cores (you probably need to adapt them). You can add as many as you want.

Nginx will listen to port 11000, so you need to change the ports in the serverinfo.py accordingly.



check if the configuration is valid:

Cod: Selectaţi tot

nginx -t

restart nginx:

Cod: Selectaţi tot

service nginx restart
Răspunde
Răspunsuri
10
Vizualizări
622
Răspunsuri
4
Vizualizări
355

Înapoi la “Securitate și protecție hackuri”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 1 vizitator