DDOS protection -
Tuntun - 19.12.2013
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?
Re: DDOS protection - Emmet_ - 19.12.2013
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.
Re: DDOS protection -
Tuntun - 19.12.2013
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
Re: DDOS protection -
Crystallize - 19.12.2013
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;
}
Re: DDOS protection - Astralis - 19.12.2013
The spam will simply stop by adding
in server.cfg.
Re: DDOS protection -
Tuntun - 19.12.2013
Thanks for help guys and +rep Emmet_ bro.