Block Player's IP !
#1

Hello how to block player's IP with This callback :

pawn Код:
public OnIncomingConnection(playerid, ip_address[], port)
{
    printf("Incoming connection for player ID %i [IP/port: %s:%i]", playerid, ip_address, port);
    return 1;
}
Example i want block this ip : 108.81.81.81 !

Help me please
Reply
#2

https://sampwiki.blast.hk/wiki/BlockIpAddress
Reply
#3

pawn Код:
public OnGameModeInt()
{
      BlockIpAddress(108.81.81.81, 60* 1000); // This will block the ip just 1 minut ? how to make permanent ?
      return 1;
}
Sorry for my bad english..
Reply
#4

If you want it permanent, just ban him...
Ban(playerid);
Reply
#5

Quote:
Originally Posted by Stinged
Посмотреть сообщение
If you want it permanent, just ban him...
Ban(playerid);
Or SendRconCommand("banip 108.81.81.81");
Reply
#6

Won't work many players changes last ip's by restarting router so instead of that use "banip 108.81.*.*"
Reply
#7

My server get attack like this :

Quote:

[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client
[03:20:01] Warning: dropping a split packet from client

So i want block his IP !
I get his IP on my server_log.txt
Reply
#8

pawn Код:
public OnGameModeInt()
{
      BlockIpAddress(108.81.81.81, 0);
      return 1;
}
Just use a 0 at the end to block the IP permanently, read https://sampwiki.blast.hk/wiki/BlockIpAddress
Reply
#9

Quote:
Originally Posted by [NWA]Hannes
Посмотреть сообщение
pawn Код:
public OnGameModeInt()
{
      BlockIpAddress(108.81.81.81, 0);
      return 1;
}
Just use a 0 at the end to block the IP permanently, read https://sampwiki.blast.hk/wiki/BlockIpAddress
This will perfectly work ?
Reply
#10

Quote:
Originally Posted by VenomMancer
Посмотреть сообщение
This will perfectly work ?
I'm not sure, if you check https://sampwiki.blast.hk/wiki/BlockIpAddress it says that it will only block the IP when they try to connect, so I don't know if this will protect you from packets being sent from a player who is not connected to your server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)