Range ban from console? -
DarkLored - 15.02.2014
Hey is it possible to range ban from the server console cause we have a wiered ddos attack that someone is trying to connect as rcon without actually connecting into the server so how can i range ban someone from console and if you can give me a way or a exsample to range ban it will be appriciated
Re: Range ban from console? -
Mark™ - 15.02.2014
Disallow all external rcon connections simply by adding rcon 0 to your server.cfg and restart. You won't even need to ban or range ban any IP.
Re: Range ban from console? -
DarkLored - 15.02.2014
But its simply an attack cause someone some how trying to connect to rcon without even being connected to the server and i want to range ban him for that cause i know a community that might do this stuff cause i have problems with them and they might be the ones that do it and i want to range ban them as well as they did it to me
here is a exsample that i tried to range ban:
E.E.E.*
E.E.*.*
E.*.*.*
Re: Range ban from console? -
Vince - 15.02.2014
Disable RCON as stated above and/or set up a proper firewall. Also the x.*.*.* range should NEVER be used for banning since those span several countries. For example, the 84.*.*.* range is used by no less than 57 (!) countries.
Re: Range ban from console? -
KevinPRINCE - 15.02.2014
No, unless you add the cmds
Re: Range ban from console? -
DarkLored - 15.02.2014
So whats the proper use to range ban i have disabled the rcon
but i want to know how to range ban for the future
Give me an exsample how to ban like now i changed it to E.E.*.*
Re: Range ban from console? -
Yoshiandluigi3 - 15.02.2014
Hey i have the same problem as you, some fool trying to DDoS my server, and I know its not coming from the server (If you get the wrong Rcon password it bans you from the server.) I really dont want to disable Rcon but I might have to. Did you ever find a solution?
Re: Range ban from console? -
xo - 15.02.2014
If you are using Linux use Iptables and they won't be able to see your server or even ping it
ex: iptables -A INPUT -s IPHERE -j DROP
on centos you gotta : service iptables save after it
Re: Range ban from console? -
wajahatlog - 18.02.2014
Код:
if(strcmp(cmd, "/rangeban", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rangeban [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
// if(IsPlayerNPC(giveplayerid)) return 1;
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
strmid(giveplayer, PlayerRPName(giveplayerid), 0, MAX_PLAYER_NAME);
strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rangeban [playerid/PartOfName] [reason]");
return 1;
}
new IP[16];
new logstring[128];
new year, month, day;
getdate(year, month, day);
if(UseAdmCmdTimer[playerid] > 2)
{
GetPlayerIp(playerid, IP, sizeof(IP));
format(logstring, sizeof(logstring), "%s [%d/%d/%d] Name: %s Key: %s Reason: Spam.", IP, day, month, year,sendername,PlayerInfo[playerid][pKey]);
BanLog(logstring);
format(string, sizeof(string), "{FF6347}SERVER: %s was banned, reason: Spam.", sendername);
SendClientMessageToAll(COLOR_WHITE, string);
PlayerInfo[playerid][pBand] = 3;
PlayerInfo[playerid][pPermBand] = 1;
format(string, sizeof(string), "Ban Reason: Spam - Banned by: Autoban");
strmid(PlayerInfo[playerid][pBanReason], string, 0, strlen(string), 255);
BanEx(playerid, "Banned By: Autoban Reason: Spam");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
{
GetPlayerIp(playerid, IP, sizeof(IP));
format(logstring, sizeof(logstring), "%s [%d/%d/%d] Name: %s Key: %s Reason: Attempting to rangeban a higher admin.", IP, day, month, year,sendername,PlayerInfo[playerid][pKey]);
BanLog(logstring);
format(string, sizeof(string), "{FF6347}SERVER: %s was banned, reason: Attempting to rangeban a higher admin.", sendername);
SendClientMessageToAll(COLOR_WHITE, string);
PlayerInfo[playerid][pBand] = 3;
PlayerInfo[playerid][pPermBand] = 1;
format(string, sizeof(string), "Ban Reason: Attempting to rangeban a higher admin - Banned by: Autoban");
strmid(PlayerInfo[playerid][pBanReason], string, 0, strlen(string), 255);
BanEx(playerid, "Banned By: Autoban Reason: Attempting to rangeban a higher admin");
return 1;
}
GetPlayerIp(giveplayerid, IP, sizeof(IP));
format(logstring, sizeof(logstring), "%s [%d/%d/%d] Name: %s Key: %s RangeBanned by: %s Reason: %s", IP, day, month, year,giveplayer,PlayerInfo[giveplayerid][pKey], sendername, (result));
BanLog(logstring);
format(string, sizeof(string), "{FF6347}SERVER: %s was rangebanned by %s, reason: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_WHITE, string);
format(string, sizeof(string), "Rangeban Reason: %s - Banned by: %s",result,sendername);
strmid(PlayerInfo[giveplayerid][pBanReason], string, 0, strlen(string), 255);
PlayerInfo[giveplayerid][pBand] = 3;
Rangeban(giveplayerid);
UseAdmCmdTimer[playerid]++;
SetTimerEx("UseAdmCmd",3*1000,0,"i",playerid); //3 seconds
return 1;
}
}
else
{
format(string, sizeof(string), " %d is not an active player !", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not authorized to use that command !");
}
}
Re: Range ban from console? -
Bingo - 18.02.2014
Change your rcon password to like this
abcd123$&@abc1b$ Make a alphabetic, Symbolised rcon password.
And
Enable that if someone try to use wrong rcon, He must be banned.