SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 29/08/2017, 08:32 PM   #11
connork
Gangsta
 
connork's Avatar
 
Join Date: May 2013
Posts: 543
Reputation: 38
Default Re: Custom Query Flood Check

The urmem lib doesn't return the source-port for your plugin import it? Maybe it'll help us in scripting, more parameters are more possibilities.
__________________

Opala 79 6cil :]

---
HeavyHost
SA-MP | MTA | VPS Windows | VPS Linux |Hospedagem de Sites | Minecraft | Streaming | VPS Anti-DDoS
360Gbps DDoS Protection in CA & Layer 7 Mitigation
40Gbps DDoS Protection in USA & Layer 7 Mitigation
connork is offline   Reply With Quote
Old 29/08/2017, 09:25 PM   #12
Paulice
Huge Clucker
 
Paulice's Avatar
 
Join Date: Jul 2017
Posts: 491
Reputation: 42
Default Re: Custom Query Flood Check

I flooded a local server (using return 1; in the callback only) and it didn't let me connect. Server still gets flooded with cookie requests.

Also, how is one able to stop flooding using this plugin (implying the above is/gets fixed)? If whatever you do still kinda makes the server unresponsive?
__________________
Being on a individual's bad side rarely means said individual is a right out bad person in general, it simply means you and that person had a bad start! Make up with that person and you both would probably even end up as friends!
Paulice is online now   Reply With Quote
Old 30/08/2017, 06:56 PM   #13
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 515
Reputation: 107
Default Re: Custom Query Flood Check

Quote:
Originally Posted by connork View Post
The urmem lib doesn't return the source-port for your plugin import it? Maybe it'll help us in scripting, more parameters are more possibilities.
Yeah, I could add port to the list of parameters, but I don't see how that would help. This attack comes from random ports, it's not like all queries use port 9999 so you could block these packets.

Quote:
Originally Posted by Paulice View Post
I flooded a local server (using return 1; in the callback only) and it didn't let me connect. Server still gets flooded with cookie requests.
Well all your bandwidth was used for flooding, so that's normal. This should never happen on a proper hosted server.

Quote:
Originally Posted by Paulice View Post
Also, how is one able to stop flooding using this plugin (implying the above is/gets fixed)? If whatever you do still kinda makes the server unresponsive?
You don't stop the flooding (that can't be done from within SA-MP server), you just tweak the SA-MP protection responsible for blocking queries. (query blocked = server appear offline)
If your server connection is solid enough, you can disable the protection entirely (return 0).
Or disable the protection for all packets except big ones (eg: normal playerlist 'c', extended playerlist 'd', external rcon 'x')
Spmn is offline   Reply With Quote
Old 03/09/2017, 04:39 PM   #14
Morpheus1992
Little Clucker
 
Morpheus1992's Avatar
 
Join Date: Jul 2011
Location: Somewhereintheuk
Posts: 33
Reputation: 0
Default Re: Custom Query Flood Check

Quote:
For better performance, implement the protection directly into plugin source code to avoid AMX overhead.
First, thanks for your awesome Plugin, I was waiting for this!

What about that you add a default protection to your Plugin directly, so if the Callback is not added in any used Scripts it will use the default one from your Plugin and if the Callback is added in any used Scripts it will use the one from PAWN written by Scripters.

Not all PAWN Scripters know how to add a protection directly into the Plugin.
Would you do that for the next Version?
Morpheus1992 is offline   Reply With Quote
Old 03/09/2017, 05:10 PM   #15
Paulice
Huge Clucker
 
Paulice's Avatar
 
Join Date: Jul 2017
Posts: 491
Reputation: 42
Default Re: Custom Query Flood Check

Quote:
Originally Posted by Spmn View Post
Well all your bandwidth was used for flooding, so that's normal. This should never happen on a proper hosted server.
I assume you can use the tool without internet (should be possible as you can connect to the server with no internet), does bandwidth even come in play in this case?

On the other hand, it will be nice to use this to block packets sent by clients with their IP banned.
__________________
Being on a individual's bad side rarely means said individual is a right out bad person in general, it simply means you and that person had a bad start! Make up with that person and you both would probably even end up as friends!
Paulice is online now   Reply With Quote
Old 03/09/2017, 07:14 PM   #16
Spmn
Gangsta
 
Join Date: Jun 2015
Location: Romania
Posts: 515
Reputation: 107
Default Re: Custom Query Flood Check

Quote:
Originally Posted by Morpheus1992 View Post
First, thanks for your awesome Plugin, I was waiting for this!

What about that you add a default protection to your Plugin directly, so if the Callback is not added in any used Scripts it will use the default one from your Plugin and if the Callback is added in any used Scripts it will use the one from PAWN written by Scripters.

Not all PAWN Scripters know how to add a protection directly into the Plugin.
Would you do that for the next Version?
If no sample script/callback is used, then the plugin will assume that you don't need any flood check, so server will respond to all queries. (equivalent of returning 0 in `OnQueryFloodCheck` - which should not cause any problems IF you got enough bandwidth)
That's the default behaviour.

Quote:
Originally Posted by Paulice View Post
I assume you can use the tool without internet (should be possible as you can connect to the server with no internet), does bandwidth even come in play in this case?
Yeah, no internet connection is required, but why would you load this plugin on a local server? Protect yourself from yourself?
Spmn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help, query flood FelipeAndres Server Support 0 20/05/2016 02:08 AM
[HELP] Query Flood Lumabd Server Support 4 06/05/2015 06:34 AM
QUERY flood in log file Garsio Server Support 2 26/10/2013 03:50 PM


All times are GMT. The time now is 07:38 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.