Just drop patch.so into sys/lua/patch.so and add
1
require 'sys.lua.patch'
into server.lua.

Notice how the server is still processing new packets after null-packets are sent into it.
Approved by Yates
Download
6 kb, 906 Downloads
Lua Scripts
Null-packet Protection
Null-packet Protection
15 like it!6 kb, 906 Downloads
require 'sys.lua.patch'

Download
mrc: That seems like something that's outside of the control of CS2D servers. What's the characteristic of the attack? Do you have any logs? Does the CS2D software crash or does your server go down? Part of the process is to play cat-and-mouse with the attacker; at the end of the day, it's far easier for you to mitigate something than for the other side to reverse-engineer what you're doing.
mrc: There are two things that rely to this problem. The first one is how you set up / configure the iptables correctly. Setting up few iptable settings isn't enough to have your server protected from DoS attacks (unless those aren't huge in terms of their request payload).
mrc Yes, unless you already had the iptables configured on your machine.
mrc: only for null (empty) attacks
mrc: There is no efficient protection against real DDoS attacks and there will never be one unless the entire internet changes completely. This script protects your server from empty package attacks which are a well known way to make CS2D servers unreachable.
Lee provided me with very helpful information on how to possibly fix this issue (thank you very much again!) in the actual CS2D software so hopefully I'm able to fix it with the next release. Until then it's very advisable to either use this protection script or to completely block all empty UDP packets with firewall rules as described on http://www.cs2d.com/security.php 