What should I do ?
#1

Hii recently my server is getting several attacks from different IPs most of them were spams for different periods of time so I think it's a kind of bruteforce or something .. may someone please tell me what should I do ? I contacted the host they said it's nothing
Reply
#2

At your server.cfg put rcon 0 or use rcon protection filterscript (search on ****** for it)
Reply
#3

I dont use rcon system anyway so rcon 0 will disable it ?
Reply
#4

rcon 0 = no password

anyhow, if they are trying from server or spamming rcon pw, simply

PHP код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!
success//If the password was incorrect
    
{
        
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ippassword);
        new 
pip[16];
        foreach(
Playeri//Loop through all players
        
{
            
GetPlayerIp(ipipsizeof(pip));
            if(!
strcmp(ippiptrue)) //If a player's IP is the IP that failed the login
            
{
                
//SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message, but if its brute its not needed..
                
Ban(i); //They are now banned.
            
}
        }
    }
    return 
1;

Reply
#5

thanks
Reply
#6

Quote:
Originally Posted by DeitY
Посмотреть сообщение
rcon 0 = no password

anyhow, if they are trying from server or spamming rcon pw, simply

PHP код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(!
success//If the password was incorrect
    
{
        
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ippassword);
        new 
pip[16];
        foreach(
Playeri//Loop through all players
        
{
            
GetPlayerIp(ipipsizeof(pip));
            if(!
strcmp(ippiptrue)) //If a player's IP is the IP that failed the login
            
{
                
//SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message, but if its brute its not needed..
                
Ban(i); //They are now banned.
            
}
        }
    }
    return 
1;

This is simply not true. rcon 0 disables rcon completely.

And although your script might seem like a nice stopgap in theory, it's most likely the rcon attempts are not made from Ingame. Furthermore, rcon already banned the user after numerous attempts. Your script doesn't solve the issue.
Reply
#7

Better would be a firewall rule that prevents Rcon packets from non-whitelisted IPs.
Reply
#8

Quote:
Originally Posted by Sithis
Посмотреть сообщение
Better would be a firewall rule that prevents Rcon packets from non-whitelisted IPs.
You can just script that.
pawn Код:
if(strcmp(ip, "127.0.0.1", true)) Kick(playerid);
Using the "whitelisted" IP instead of 127.0.0.1.
Reply
#9

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
You can just script that.
pawn Код:
if(strcmp(ip, "127.0.0.1", true)) Kick(playerid);
Using the "whitelisted" IP instead of 127.0.0.1.
I said firewall rule, that would prevent rcon packets from non-whitelisted IPs from reaching your sa-mp server altogether.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)