User
Pass
2FA
 
 

Protection from traffic temporary blocked [IP block]

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash
Author Message6525
WaSaAa

[Mentally Stable]



Status: Offline
(since 12-06-2013 09:11)
Joined: 20 Jan 2012
Posts: 27, Topics: 5
Location: Spain

Reputation: 53.9
Votes: 2

Post Posted: 13-09-2012, 17:09:05 | Translate post to: ... (Click for more languages)

Original text by me, warranty WaSaAa

Protect against/from
Code:
[DPROTO]: traffic temporary blocked from 110.159.254.46 for flooding; PPS=15.369986; WarnLevel=2.061626
[DPROTO]: traffic temporary blocked from 101.119.14.214 for flooding; PPS=100.000000; WarnLevel=3.333333
[DPROTO]: traffic temporary blocked from 175.136.115.233 for flooding; PPS=99.000000; WarnLevel=3.300000
[DPROTO]: traffic temporary blocked from 64.120.22.141 for flooding; PPS=100.000000; WarnLevel=3.333333


Features: block ip attack. ban 360 min.

Files required (functions: dp_traffic_block and Con_Printf / libraries: dproto) http://www66.zippyshare.com/v/18295625/file.html


1º Install module orpheu (orpheu_base: http://forums.alliedmods.net/showthread.php?t=116393)

2º Order amxmodx/configs/modules.ini
Code:
;mysql
;sqlite

orpheu
fun
engine
fakemeta
geoip
sockets
regex
nvault
cstrike
csx
hamsandwich


3º Order metamod/plugins.ini (if not, then nothing will work.)
Code:
win32   addons\mmtimer\mmtimer.dll
win32   addons\amxmodx\dlls\amxmodx_mm.dll
win32   addons\dproto\dproto.dll


4º Write dp_block.amxx in amxmodx/configs/plugins.ini


Clean code dp_block.sma
Code:

#include <amxmodx>
#include <orpheu>
#include <orpheu_advanced>
#include <orpheu_stocks>
#define PLUGIN "IP block"
#define VERSION "0.1"
#define AUTHOR "kanagava"


new OrpheuHook:handlePrintf


public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   set_task(2.01, "regfunctions")
}
public regfunctions()
{
   OrpheuRegisterHook(OrpheuGetFunction("dp_traffic_block"),"dp_traffic_block_OrpheuHookPost", OrpheuHookPost)
   OrpheuRegisterHook(OrpheuGetFunction("dp_traffic_block"),"dp_traffic_block_OrpheuHookPre", OrpheuHookPre)
}

public OrpheuHookReturn:dp_traffic_block_OrpheuHookPost(const a[], const b[] , const c[] )
{
   OrpheuUnregisterHook(handlePrintf)

   return OrpheuIgnored;
}

public OrpheuHookReturn:dp_traffic_block_OrpheuHookPre(const a[], const b[] , const c[] )
{
   
   handlePrintf = OrpheuRegisterHook( OrpheuGetFunction( "Con_Printf" ), "Con_Printf" , OrpheuHookPre);
   return OrpheuIgnored;
}

public OrpheuHookReturn:Con_Printf(const a[], const b[])
{
   if (containi(b,"traffic temporary blocked")>-1)
   {
      new msg[256]
      copy(msg,255,b)
      del_log(msg)
      return OrpheuSupercede;
   }
      
   return OrpheuIgnored;
}

public del_log(mess[])
{
   static szLeft[300], szRight[300]
   split ( mess, szLeft, 299, szRight, 299, "traffic temporary blocked from ")
   copy(mess, 299, szRight)
   split ( mess, szLeft, 299, szRight, 299, " for flooding")
   containi(mess,"traffic temporary blocked")
   server_cmd("addip 360.0 %s",szLeft)
   //log_to_file("trafic_blocked","[BLOCKED FROM] %s",szLeft)
}



Last edited by WaSaAa on 19-11-2012, 15:02:56; edited 1 time in total
0 0
  
Back to top
View user's profile Send private message
rx1983

[Mentally Stable]



Status: Offline
(since 17-10-2017 20:46)
Joined: 24 May 2011
Posts: 10, Topics: 2
Location: brasil

Reputation: 53.3
Votes: 2

Post Posted: 16-09-2012, 22:01:40 | Translate post to: ... (Click for more languages)

this plugin does not kick and not banned anyone.
listip.cfg the file remains empty.

and mensage flood keeps appearing in the log file.

Code:
L 09/16/2012 - 16:09:23: [DPROTO]: traffic temporary blocked from 173.245.60.120 for flooding; PPS=0.000000; WarnLevel=0.000000
L 09/16/2012 - 16:09:31: [DPROTO]: traffic temporary blocked from 173.245.60.120 for flooding; PPS=0.000000; WarnLevel=0.000000
L 09/16/2012 - 16:09:43: [DPROTO]: traffic temporary blocked from 173.245.60.120 for flooding; PPS=0.000000; WarnLevel=0.000000


http://www.freakz.ro/forum/
0 0
  
Back to top
View user's profile Send private message
WaSaAa

[Mentally Stable]



Status: Offline
(since 12-06-2013 09:11)
Joined: 20 Jan 2012
Posts: 27, Topics: 5
Location: Spain

Reputation: 53.9
Votes: 2

Post Posted: 17-09-2012, 10:20:11 | Translate post to: ... (Click for more languages)

rx1983 wrote:
this plugin does not kick and not banned anyone.
listip.cfg the file remains empty.

and mensage flood keeps appearing in the log file.

Code:
L 09/16/2012 - 16:09:23: [DPROTO]: traffic temporary blocked from 173.245.60.120 for flooding; PPS=0.000000; WarnLevel=0.000000
L 09/16/2012 - 16:09:31: [DPROTO]: traffic temporary blocked from 173.245.60.120 for flooding; PPS=0.000000; WarnLevel=0.000000
L 09/16/2012 - 16:09:43: [DPROTO]: traffic temporary blocked from 173.245.60.120 for flooding; PPS=0.000000; WarnLevel=0.000000




1 It is not permanent ban is temporary (360 min.) And that is not recorded in listip.cfg (in the only permanent cfg).

2 As seen the effectiveness of the attack? flooding; PPS = 0.000000; warnlevel = 0.000000 (this means to you not affected)

I think you're still a newbie and so I will take into account not, you still have much to learn.

0 0
  
Back to top
View user's profile Send private message
rx1983

[Mentally Stable]



Status: Offline
(since 17-10-2017 20:46)
Joined: 24 May 2011
Posts: 10, Topics: 2
Location: brasil

Reputation: 53.3
Votes: 2

Post Posted: 17-09-2012, 12:50:00 | Translate post to: ... (Click for more languages)

ok, I'll do some tests.
the log file further still becomes very large
although the attack is blocked.


http://www.freakz.ro/forum/
0 0
  
Back to top
View user's profile Send private message
mr_vai

[Mentally Stable]



Status: Offline
(since 26-10-2012 04:02)
Joined: 22 Oct 2012
Posts: 2, Topics: None
Location: Vietnam

Reputation: 46.1
Votes: 2

Post Posted: 22-10-2012, 04:33:57 | Translate post to: ... (Click for more languages)

I used DP block your server and log on like this
Here it did not block, just connect to the server is being
[DPROTO]: Client 0 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
[DPROTO]: Client 1 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
[DPROTO]: Client 2 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
Dropped (1)Volcano Soldier from server
Reason: Client sent 'drop'
101.99.7.47:33282:reconnect
[DPROTO]: Client 2 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
[DPROTO]: Client 3 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0

0 0
  
Back to top
View user's profile Send private message
WaSaAa

[Mentally Stable]



Status: Offline
(since 12-06-2013 09:11)
Joined: 20 Jan 2012
Posts: 27, Topics: 5
Location: Spain

Reputation: 53.9
Votes: 2

Post Posted: 23-10-2012, 10:24:53 | Translate post to: ... (Click for more languages)

mr_vai wrote:
I used DP block your server and log on like this
Here it did not block, just connect to the server is being
[DPROTO]: Client 0 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
[DPROTO]: Client 1 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
[DPROTO]: Client 2 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
Dropped (1)Volcano Soldier from server
Reason: Client sent 'drop'
101.99.7.47:33282:reconnect
[DPROTO]: Client 2 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0
[DPROTO]: Client 3 - Set AuthIdType 8 [PeY hY ]; pClient = 099D22B0


It works well on Windows, Linux can fault, this plugin is at version 0.1 is not yet finished.

Sorry buddy

0 0
  
Back to top
View user's profile Send private message
mr_vai

[Mentally Stable]



Status: Offline
(since 26-10-2012 04:02)
Joined: 22 Oct 2012
Posts: 2, Topics: None
Location: Vietnam

Reputation: 46.1
Votes: 2

Post Posted: 23-10-2012, 11:34:48 | Translate post to: ... (Click for more languages)

i'm run window
new version ???

0 0
  
Back to top
View user's profile Send private message
iol

[Mentally Stable]



Status: Offline
(since 16-02-2013 08:48)
Joined: 02 Nov 2012
Posts: 2, Topics: 1
Location: Egypt

Reputation: 48.1
Votes: 2

Post Posted: 02-11-2012, 21:02:41 | Translate post to: ... (Click for more languages)

if i want that plugin to make log for ban ip

how can i make that on this plugin??

i mean there is any cvar or anything to enable log banips ?

because i didnt get any log about it

0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash  


The time now is 24-04-2024, 20:39:25
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x