SphereCommunity
SphereServer flood control - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: SphereServer flood control (/Thread-SphereServer-flood-control)

Pages: 1 2 3


RE: SphereServer flood control - massis87 - 06-22-2017 08:44 AM

version? .ini?

my .ini is this



RE: SphereServer flood control - rastrero - 06-22-2017 08:57 AM

yes it is a packet problem but until it is solved the script I wrotte should stop anyone to taking down the server...


RE: SphereServer flood control - massis87 - 06-22-2017 09:04 AM

yes... but.
if i make a macro with only useskill 'hiding' and put that on loop the problem persist.


RE: SphereServer flood control - massis87 - 06-22-2017 07:59 PM

i've do a stupid solution.
add this events on players,
remove player speech on logmask.
add a persisten memory for check the abuse control with 30 loops in one secs.
seems work great but i dont know the impact in long end.
turn on f_oncommand on sphere.ini

[function f_oncommand]
tag.antiflood +=1


[speech spk_antiflood]
on=*
tag.antiflood +=1


[events e_antiflood]

on=@itemdclick
tag.antiflood +=1


on=@skillprestart
tag.antiflood +=1


[itemdef i_antiflood]
defname i_rune_polymorph
ID=i_rune_polymorph
NAME=Memory : Antiflood
layer=layer_special
type=t_eq_script

CATEGORY=Seven - Antiflood
SUBSECTION=Memory [Non Usare]
DESCRIPTION=Memory : Antiflood


ON=@CREATE
ATTR=attr_invis|attr_decay


on=@timer
if <eval <cont.tag0.antiflood>><=30
cont.tag.antiflood 0
else
serv.log Control System Anti Flood: <cont.name> disconnected
cont.tag.antiflood 0
cont.disconnect
endif

timer 1
return 1


RE: SphereServer flood control - darksun84 - 06-22-2017 08:08 PM

Does this happens just with uosteam or also with Razor and similar? ( I can't run uosteam on windows 10)


RE: SphereServer flood control - massis87 - 06-23-2017 12:53 AM

Only with uosteam. With razor is OK.


RE: SphereServer flood control - escribano - 06-23-2017 11:51 AM

This is my anti-flood i've made this to prevent the speech or command be process on sphere:

Code:
// Add next line do sphere.ini
// PACKET173=f_packet_0xad

[FUNCTION f_packet_0xad]
ref1 = <local.char>
if (<ref1.isgm> == 1)
  return 0
endif

if (<ref1.restest i_flood_protection>)
ref1.sysmessage @07a1 Shard Name anti-flood:
ref1.sysmessage @077a Wait a little longer to send message.
ref1.findid.i_flood_protection.timer 1
return 1
endif

serv.newitem i_flood_protection
new.timer = 1
new.cont  = <ref1.uid>
return 0

[ITEMDEF i_flood_protection]
NAME=Anti-Flood Protection
ID=i_memory
TYPE=t_eq_script
LAYER=layer_special

ON=@Create
more1=0
attr=attr_decay|attr_invis|attr_newbie

ON=@Timer
remove

You can change it easily to adapt to your shard... this one doesn't release the player to speech if he won't wait 1 second... so if the player tries to speak again the timer resets...
Also, you can add +1 sec if the player won't wait.... so you can punish 'em for flooding Smile

Now I've read the entire post.... I've got this problem too... someone figured out this and started to crash the server...

So I've made this script properly to fix this... also, I've noticed that if the player does it on skillmenu this behavior crashes sphere too... so I've added this to the e_player event (or any event you know that all players have):

Code:
ON=@SkillMenu
    if (<restest i_craft_delay>)
      sysmessage @077a,0,1 Anti-crash protection: wait 1 second to open the menu again
      return 1
    endif

    serv.newitem i_craft_delay
    equip <new>

    return 0

[ITEMDEF i_craft_delay]
ID=i_memory
TYPE=t_eq_script
NAME=craft timer

ON=@Equip
    timer=1

ON=@Timer
    remove
    return 1

See yah!


RE: SphereServer flood control - darksun84 - 06-23-2017 09:40 PM

What about the OF_FloodProtection setting in the .ini?

Code:
Added OF_Flood_Protection as a control of toggling appearence of same
  messages and sysmessages one after another. Note, that this setting is always
  off for PLEVEL 2 or upper, so GMs will always get everything.

I think it needs a server restart for applying its effect.


RE: SphereServer flood control - massis87 - 06-24-2017 12:44 AM

ok escribano i see your script, im going to add the @skillmenu on my event to block that too.
i prefer players disconnect and put a delay on the macro than add a item in loop but the job is the same.

the big problem is servers dont have a good internal flood packet control.
is a little ridicolous get an internal "ddos attack" with a 2014 3rd party tool for me.


RE: SphereServer flood control - escribano - 07-18-2017 01:01 AM

I've developed a solution to mitigate 100% of DDoS requests at my server Smile

I'm doing A LOT of tests now to ensure the software works.... I'm planning to offer this DDoStroyer (As we called) for any game server/services. (for now, the solution only works on AWS data center cuz we can manage the aws subnet firewall)

If you're interested in test this solution, please send me a PM and let's talk about it Smile

Here is a picture of the Launcher we've made to manage and release IP's from our extern firewall Smile

[Image: ddostroyer.png]

The player needs to use the in-game login/password to release it's IP to see the server and EVEN if the attacker finds the server IP, it doesn't matter Smile if your IP is not released the AWS Subnet... the server is "unreachable" for you, this way the shard seems to be "offline" for those who don't use the launcher Smile

I've mitigated 3x attacks this weekend with no cost for the shard Smile

0kb of malicious bandwidth received during this attacks, from more than 83k requests per minute.