[PEDIDO] Maximo Dois ips Igual no Servidor
#1

Bom procurei alguns posts aqui no fуrum e achei muitos mais nгo um que me ajude. Queria saber se teria como ter no mбximo dois ips iguais no servidor, estou sofrendo muito ataques.

Obrigado desde jб.
Reply
#2

Pelo que jб vi, tem um FS chamado maxips na pasta Filterscripts quando vocк baixa o Sa-mp, use-o.
Reply
#3

Sim Tem Uma Fs Na Pasta filterscripts Chamada maxips
Aqui a FS

pawn Код:
// maxips FS limits the number of players connecting from a
// single IP address.

#include <a_samp>

#define MAX_CONNECTIONS_FROM_IP     3

//---------------------------------------------

public OnFilterScriptInit()
{
    printf("\n*** Player IP limiting FS (maxips) Loaded. Max connections from 1 IP = %d\n",MAX_CONNECTIONS_FROM_IP);
}

//---------------------------------------------
// GetNumberOfPlayersOnThisIP
// Returns the number of players connecting from the
// provided IP address

stock GetNumberOfPlayersOnThisIP(test_ip[])
{
    new against_ip[32+1];
    new x = 0;
    new ip_count = 0;
    for(x=0; x<MAX_PLAYERS; x++) {
        if(IsPlayerConnected(x)) {
            GetPlayerIp(x,against_ip,32);
            if(!strcmp(against_ip,test_ip)) ip_count++;
        }
    }
    return ip_count;
}

//---------------------------------------------

public OnPlayerConnect(playerid)
{
    new connecting_ip[32+1];
    GetPlayerIp(playerid,connecting_ip,32);
    new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);
   
    if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP) {
        printf("MAXIPs: Connecting player(%d) exceeded %d IP connections from %s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
        Kick(playerid);
        return 1;
    }

    return 0;
}
   
//---------------------------------------------
Reply
#4

Acho que isso nгo resolve muito bem. O ideal seria vocк comprar um host com uma boa proteзгo DDoS.
Se nгo me engano existe um script que bloqueia a quantidade de bots "ips logados" , mais sу resolve no prуprio servidor, e nгo na maquina que esta seu servidor.
Reply
#5

Obrigado SuB_ZeRo0_ e Don_Speed por tirar minha duvida.
Reply
#6

Quote:
Originally Posted by Moskito
Посмотреть сообщение
Acho que isso nгo resolve muito bem. O ideal seria vocк comprar um host com uma boa proteзгo DDoS.
Se nгo me engano existe um script que bloqueia a quantidade de bots "ips logados" , mais sу resolve no prуprio servidor, e nгo na maquina que esta seu servidor.

Ta Falando Serio
Se Tiver Bebeu Nao Sabe Ler ? Isso Limitara a Conexao de Ip
Maximo 2 Conexao Por Ip ¬¬
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)