The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SphereServer flood control
Author Message
massis87
Journeyman
*

Posts: 82
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0

D&W 8thAge

Post: #11
RE: SphereServer flood control
version? .ini?

my .ini is this

There are worse ways to understand the sense of the word: no. Ranting
(This post was last modified: 06-22-2017 08:49 AM by massis87.)
06-22-2017 08:44 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #12
RE: SphereServer flood control
yes it is a packet problem but until it is solved the script I wrotte should stop anyone to taking down the server...
06-22-2017 08:57 AM
Find all posts by this user Like Post Quote this message in a reply
massis87
Journeyman
*

Posts: 82
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0

D&W 8thAge

Post: #13
RE: SphereServer flood control
yes... but.
if i make a macro with only useskill 'hiding' and put that on loop the problem persist.

There are worse ways to understand the sense of the word: no. Ranting
(This post was last modified: 06-22-2017 08:00 PM by massis87.)
06-22-2017 09:04 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
massis87
Journeyman
*

Posts: 82
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0

D&W 8thAge

Post: #14
RE: SphereServer flood control
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

There are worse ways to understand the sense of the word: no. Ranting
(This post was last modified: 06-22-2017 08:00 PM by massis87.)
06-22-2017 07:59 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #15
RE: SphereServer flood control
Does this happens just with uosteam or also with Razor and similar? ( I can't run uosteam on windows 10)
06-22-2017 08:08 PM
Find all posts by this user Like Post Quote this message in a reply
massis87
Journeyman
*

Posts: 82
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0

D&W 8thAge

Post: #16
RE: SphereServer flood control
Only with uosteam. With razor is OK.

There are worse ways to understand the sense of the word: no. Ranting
06-23-2017 12:53 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #17
RE: SphereServer flood control
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!

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 06-23-2017 12:04 PM by escribano.)
06-23-2017 11:51 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes escribano's post
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #18
RE: SphereServer flood control
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.
06-23-2017 09:40 PM
Find all posts by this user Like Post Quote this message in a reply
massis87
Journeyman
*

Posts: 82
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0

D&W 8thAge

Post: #19
RE: SphereServer flood control
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.

There are worse ways to understand the sense of the word: no. Ranting
(This post was last modified: 06-24-2017 12:46 AM by massis87.)
06-24-2017 12:44 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #20
RE: SphereServer flood control
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.

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
07-18-2017 01:01 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)