Files

> > CS2D > Lua Scripts > Null-packet Protection
Files overviewCS2D overviewLua Scripts overview

English Null-packet Protection >

37 comments6 kb, 590 Downloads

old Null-packet Protection

Lee
Moderator Off Offline

If you're running a linux dedicated server and you don't have root access to set up iptable rules to mitigate these recent DoS attacks, you can now fix this from within Lua.

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

into server.lua.

IMG:https://i.imgur.com/E37R9hE.png


Notice how the server is still processing new packets after null-packets are sent into it.
Approved by Yates

Download Download

6 kb, 590 Downloads

Comments

37 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old @lee

karthik
User Off Offline

For 1.0.0.7 available?

old

kerker
User Off Offline

I like your program. Nice!
I like it!

old

floria
User Off Offline

@user GeoB99 oooh i understand.

Well, i will just get this if i do not have root/sudo privileges.
I like it!

old

GeoB99
Moderator Off Offline

@user floria: You completely misunderstood user Yates's comment. Not everybody is a Linux-geek especially when setting up iptable rules and exceptions within firewall configuration. Proper teaching and learning won't hurt but you can't apply to every single person as not everybody likes to read much.

Are you a Linux newbie? Get this tool! Can't set up iptable rules due to lack of administrative rights for some reason? Get this tool!
I like it!

old

floria
User Off Offline

user Yates has written
Very useful for those who are not or cannot into Linux.

Dude Linux can be used in almost all pc's around the world. You can even use cs2d dedicated without graphical interface. You don't even need to install a linux distro in order to run it. And if you are not on Linux, download a freaking Ubuntu distro and run it into a VM. That's all: Linux > Windows.

user Lee: Nice work on this dude
I like it!

old

ead
User Off Offline

Our nice guy that will test soon, thank you.
I like it!

old

mrc
User Off Offline

Server still crash with attacks.

old

Marco X
User Off Offline

It very nice
i think need add in debug like it "Caught a null packet from 127.0.0.1:2343".
I like it!

old

cartel
User Off Offline

Nice work !
I like it!

old

Lee
Moderator Off Offline

Yes, it's effectively the same thing. This script is targeted at people who don't have access to iptables for whatever reason, as long as they can upload scripts, they can still seek protection.

old

mrc
User Off Offline

A friend of mine said this script is the same of: sudo iptables -A INPUT -p udp -m length --length 0:28 -j DROP

old

Angel DEED
BANNED Off Offline

Thanks god
I like it!

old

Mami Tomoe
User Off Offline

The description tells me its compatible with Linux, it does not tell anything about windows and so I was asking to make sure.

old

GeoB99
Moderator Off Offline

@user Mami Tomoe: If the description tells you that it's compatible with Linux dedicated servers, then what do you think?
I like it!

old

Mami Tomoe
User Off Offline

Is it Linux only?

old

Gaios
Reviewer Off Offline

Yeah.. it's good √
I like it!

old

Marcell
Super User Off Offline

I love you Lee!
I like it!

old

Lee
Moderator Off Offline

@user mrc: is it still on-going? Furthermore, have you restarted your server since your original iptable rule? These rules are not persistent unless you are explicit about such things.

One of the things to note is that if ./cs2d_dedicated is inundated with random packets, it will take forever to process everything, but nevertheless, if you look at the log or the standard output of the process, it will still run smoothly. More importantly, it shouldn't crash. If your server is getting DDoSed and your process runs out of available space because of the incoming packets, then it means that the attacker is sending a sequence of well-formed packets that CS2D understands one after the other to trigger non-trivial workload. If I were you, I would set up a passive sniffer on 36963 and create a frequency table of the occurrence of each packet type broken down by each minute. Next time you get taken down, consult this histogram to see what's going on, and then create an iptable rule based on that.

old

Nekomata
User Off Offline

Helpful and easy to implement. Thanks for sharing.
I like it!

old

mrc
User Off Offline

The attacks doesnt do a thing on vps, but the cs2d_dedicated stop responding. I already have an autorestart for cs2d_dedicated. Its annoying when people crash the serv when its full or while clanwars and mixes. Oh well.
To the start Previous 1 2 Next To the start