DDOS protection
#1

Hello,I'm using a server which is edited by me. and i hosted it. but there are some problem with ddos attack or something... i'm getting message like this:

[19:25:12] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:12] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:12] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:12] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:12] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93
[19:25:13] BAD RCON ATTEMPT BY: 95.85.1.93


Anyone can help me about it? please i really need a good protection... if any download link/suggestion?
Reply
#2

That's not DDoS, it's just some idiot trying to brute force your RCON.

I suggest you turn RCON off in your server. Put "rcon 0" in your server.cfg.
Reply
#3

Like this?:
Code:
echo Executing Server Config...
lanmode 0
rcon_password FUCKYOURMOMBITCHSUCKSICKASS
rcon 0
maxplayers 50
port 7777
hostname .: 18 Wheels of Trucking :.
gamemode0 18WoS 1
filterscripts
plugins sscanf streamer
announce 0
query 1
chatlogging 1
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
Reply
#4

Code:
OnRconLoginAttempt(ip[], password[], success) {
	
	#pragma unused password
	
	if (!success) {
		
		new hasplayers = 0;
		
		new pip[16];
		for (new PlayerID=0; PlayerID < MAX_PLAYERS; PlayerID++) {
			
			if (!IsPlayerConnected(PlayerID))
				continue;
			
			GetPlayerIp(PlayerID, pip, sizeof(pip));
			
			if (!strcmp(ip, pip, true)) {
				
				hasplayers++;
				
				// protect nubs against their stupidity.
				new timex = TimeSincePvar(PlayerID, "last_rcon_attempt");
				
				if (timex > 1000) {
					
					SendPlayerMessage(PlayerID, COLOR_RED, "Do not abuse the rcon system, you will be banned if you fail to login again.");
										
				}
				
				SetPVarInt(PlayerID, "last_rcon_attempt", TickCount());
				
				new rla;
				rla = GetPVarInt(PlayerID, "rcon_login_attempts");
				
				rla = rla + 1;
				
				if (rla > 3) {
					
					// ban the ip via rcon
					makestrf(banipstr, 64, "banip %s", ip);
					SendRconCommand(banipstr);
					
				}
				
				SetPVarInt(PlayerID, "rcon_login_attempts", rla);
				
			}
			
		} // loop
		
		if (hasplayers == 0) {
			
			// ban the ip via rcon
			makestrf(banipstr, 64, "banip %s", ip);
			SendRconCommand(banipstr);
			
		}
		
	}
	
	return PCOR_CONTINUE;
}
Reply
#5

The spam will simply stop by adding

Code:
rcon 0
in server.cfg.
Reply
#6

Thanks for help guys and +rep Emmet_ bro.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)