Dynamic IP ban
#1

Hello everybody!
I have got a cheater on my server with dynamic IP so i can ban him.
I have heard about dynamic ip ban.
Is it possible?
Reply
#2

Well I think you mean that you ban the principal IP from this cheater.
Example:

Cheater have ID 55.444.333.223.

You can ban now the IP 55.444.*.*

It means you ban all IPs that have at the beginning 55.444.
In common the command is called /rangeban. Search on forum for it.
Reply
#3

Be careful with usage. 88.*.*.* will probably ban an entire country, while 88.54.151.* probably just bans a small location.
Reply
#4

Ok thanks!
Now i want to create if the player connects bans him
his ip is 109.61.***.***
i dont know how to use GetPlayerIP
can you help?

Code:
new plrIP[16];
  GetPlayerIp(playerid, plrIP, sizeof(plrIP));
  if(!strcmp(plrIP, "109.61"))
  SendClientMessage(playerid, 0xFFFFFFFF, "hehehe -.-'");
  Ban(playerid);
will this work?
Reply
#5

Probably not.

I'd say enter as RCON admin and type /rcon banip 109.61.*.*
Reply
#6

ok i will try
Reply
#7

I had exactly same problem. I fixed it via this simple code, under OnPlayerConnect of course.


pawn Code:
if (!udb_Exists(PlayerName(playerid))) { //If there is no account created with player's name, happens the following:

  new ip[16];
  GetPlayerIp(playerid, ip, sizeof(ip));
if (strcmp(ip, "85.76", false, 5) == 0) //If IP Starts with 85.76 (5 characters) = kick
{
  SendClientMessage(playerid, COLOR_ORED, "Error: Your IP- Address has been range banned by the management. Try again later or contact the management");
  Kick(playerid);
}
if (strcmp(ip, "85.77", false, 5) == 0) //If IP Starts with 85.77 (5 characters) = kick
{
  SendClientMessage(playerid, COLOR_ORED, "Error: Your IP- Address has been range banned by the management. Try again later or contact the management");
  Kick(playerid);
}
  }
This is my own one. Simple & working


Quote:
Originally Posted by Hiddos
Probably not.

I'd say enter as RCON admin and type /rcon banip 109.61.*.*
Don't do this. You might ban someone from the same range. Try to create something like my one above.
Reply
#8

Didn't strcmp compare two strings? Then I'm wondering how it works
Reply
#9

Yes but that /rcon banip worked
I have tried it to my ip
than i disconnected and when i connceted it sayd: You are banned from this server.
Thanks for help

PS:I will unban myself XD
Reply
#10

Quote:
Originally Posted by Flashy
View Post
Well I think you mean that you ban the principal IP from this cheater.
Example:

Cheater have ID 55.444.333.223.

You can ban now the IP 55.444.*.*

It means you ban all IPs that have at the beginning 55.444.
In common the command is called /rangeban. Search on forum for it.
or if you're really evil do "ipban 5*.***.***.***"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)