English Any Anti-Crash / Auto Restart?

19 replies
Goto Page
To the start Previous 1 Next To the start
Up
Rygna
User
Offline Off
Hello, Recently.. my Servers always getting Crash. i don't know why my server Always Crashed. maybe DDOS or Server-Side Issues.

but, is there Anti-Crash or Auto Restart Scripts to re-open cs2d_dedicated?.
i tried it but its failed and no working. after all, i tried all steps on google & websites.

if you have solution, please share it to me.
Thanks. also sorry for my bad english.

EDIT: My server OS is Linux. Specific?, Ubuntu 16.04.
Begone.

Admin/mod comment:

Incorrect section, this is merely related to servers. Moved. /user Fraizeraust
05.06.17 04:30:42 pm
Up
BcY
User
Offline Off
iptables -A INPUT -p udp -m length --length 0:28 -j DROP


Try this iptables rule, mate.

also i saw the thread that you created; thread cs2d Install Anti-DDoS on linux vps
why don't you use it?
Kgb2d Community - Since 2012
05.06.17 04:34:02 pm
Up
Rygna
User
Offline Off
@user BcY: Thanks, i'll try it

EDIT: i already use that. but it's not worked.
Begone.
05.06.17 04:53:16 pm
Up
Fraizeraust
Moderator
Offline Off
If I were you I would double check the tcpdump records and see the coming source of these null packets which flood your server. You can install it with the command as follows if you don't have it:

sudo apt-get install tcpdump


Afterwards take a track on all the traffic of your server and check it with
tcpdump -i eth0
.

As for an auto-restart script you could get it from thread cs2d Server Auto Restart script [LINUX/VPS] (solved), user Nekomata gave a very detailed tutorial on how to set up.
05.06.17 05:05:48 pm
Up
Rygna
User
Offline Off
ahh, i got auto restart scripts from @user Nekomata. thanks @user Fraizeraust.

well, maybe this is server-side problem.. when my server reach 20 - 32 players, my server is crashed. is cs2d need so much ram to run 32player?

sry about my english.
Begone.
05.06.17 05:28:01 pm
Up
DC
Admin
Offline Off
No, CS2D does not need much ram at all. Unless you do crazy Lua things. Of course it depends on how much available memory your machine has for CS2D. If it is just a few megabytes you might run into problems.

You can check the memory usage under Linux with
top
or - with fancy colors -
htop
(needs to be installed first)
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
05.06.17 05:31:13 pm
Up
Hajt
User
Offline Off
I bet that someone tried to flood your server. I highly recommend you to implement these iptables rules:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
IPT="/sbin/iptables"
DNS_SERVER="8.8.4.4 8.8.8.8"

iptables -F

for ip in $DNS_SERVER
do
     echo "Allowing DNS lookups (tcp, udp port 53) to server '$ip'"
     $IPT -A OUTPUT -p udp -d $ip --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
     $IPT -A INPUT  -p udp -s $ip --sport 53 -m state --state ESTABLISHED     -j ACCEPT
     $IPT -A OUTPUT -p tcp -d $ip --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
     $IPT -A INPUT  -p tcp -s $ip --sport 53 -m state --state ESTABLISHED     -j ACCEPT
done

$IPT -A INPUT -p udp -m udp --sport 19 -j DROP
$IPT -A INPUT -p udp -m udp --sport 53 -j DROP
$IPT -A INPUT -p udp -m udp --sport 1434 -j DROP
$IPT -A INPUT -p udp -m udp --sport 137:138 -j DROP
$IPT -A INPUT -p udp -m udp --sport 123 -j DROP
$IPT -A INPUT -p udp -m udp --sport 111 -j DROP
$IPT -A INPUT -p udp -m udp --sport 161:162 -j DROP
$IPT -A INPUT -p udp -m udp --sport 1900 -j DROP
$IPT -A INPUT -p udp -m udp --sport 27005 -j DROP
$IPT -A INPUT -p udp -m string --string "SAMPY" --algo bm --to 60 -j DROP 
$IPT -A INPUT -p udp -m string --string "HTTP/1.1 200 OK" --algo bm --to 75 -j DROP
$IPT -A INPUT -p udp -m length --length 0:28 -j DROP


Just save it in file and then execute, make sure that you use google dns servers.
Yooo. We are playing mix matches 5on5 in evening hours on the server CS2D.TK | Mix/Match, you can join us, server password is match. Statistics, leaderboard can be found under the following link.
05.06.17 05:31:43 pm
Up
Fraizeraust
Moderator
Offline Off
@user Rygna: Normally the dedicated server should not take much RAM unless your computer is really old although I highly doubt as you run Ubuntu 16.04. You can check the RAM usage of processes with
top
command anyway. Note the RAM usage of a process is denoted as %MEM (Memory Usage in Percentage) and %CPU (CPU Activity in Percentage).

Either way you can check it with the Task Manager of Ubuntu, much friendlier way for the average Joe. Still I'd rather track and get the records of tcpdump to see what is happening with my server.
05.06.17 06:02:51 pm
Up
Rygna
User
Offline Off
Thanks all, i'll try @user Hajt method~
Begone.
05.06.17 11:30:09 pm
Up
BcY
User
Offline Off
@user Hajt: why he should use google dns servers?
Kgb2d Community - Since 2012
06.06.17 07:01:39 am
Up
Hajt
User
Offline Off
@user BcY: Hmm because google's ip is set in script above, also these dns are pretty fast and so far it works without any problems on my virtual servers.
Yooo. We are playing mix matches 5on5 in evening hours on the server CS2D.TK | Mix/Match, you can join us, server password is match. Statistics, leaderboard can be found under the following link.
06.06.17 09:28:37 pm
Up
BcY
User
Offline Off
@user Hajt: i got it. Also is it possible to use it without dns?
Kgb2d Community - Since 2012
06.06.17 10:20:24 pm
Up
gotya2
GAME BANNED
Offline Off
Instead of checking whether the process still exists, it would be better to check whether the server is responding to 'request info' requests. In the past it used to happen that someone would flood a server with packets (DoS), and the server would still show up in the process list, it would however not respond to any packets and effectively be offline.
06.06.17 10:25:05 pm
Up
_Yank
User
Offline Off
Basically what @user gotya2 said. I have a python script for that (it also checks if the server is using too much memory) but you'll have to wait a bit if you want it.

@user BcY: Yes, that part of the script isn't mandatory
07.06.17 04:46:29 am
Up
mrc
User
Offline Off
@user Hajt: this script is enough to protect against ddos? cuz I'm paying too much money for anti-ddos on my vps. lol
CS2D GLOBAL's Discord Server: https://discord.gg/kgfwH4P
07.06.17 08:42:33 am
Up
Hajt
User
Offline Off
@user mrc: Anti-ddos protection doesn't work because it is problem related to CS2D. You can flood the game server with low number of packets. I was able to DDoS @user Yates's dedicated server which had pretty strong anti-ddos protection in OVH so you know. These rules works against free ip stresser services.
Yooo. We are playing mix matches 5on5 in evening hours on the server CS2D.TK | Mix/Match, you can join us, server password is match. Statistics, leaderboard can be found under the following link.
08.06.17 01:08:09 am
Up
mrc
User
Offline Off
So these iptable rules + basic ddos-protection is enough.
edited 1×, last 08.06.17 01:21:34 am
CS2D GLOBAL's Discord Server: https://discord.gg/kgfwH4P
08.06.17 10:56:30 am
Up
Quattro
GAME BANNED
Offline Off
Wow guys, what a hacker pros you are! Learn the difference for once:

"The Difference Between DoS and DDos Attacks. A Denial of Service (DoS) attack is different from a DDoS attack. The DoS attack typically uses one computer and one Internet connection to flood a targeted system or resource. The DDoS attack uses multiple computers and Internet connections to flood the targeted resource."
08.06.17 11:26:15 am
Up
Yates
Reviewer
Offline Off
@user Quattro: The day that happens is the day that @user Pagyra stops saying standart.

See you in never never land.
08.06.17 12:44:45 pm
Up
Hajt
User
Offline Off
@user Quattro: Why did you say that? No one said that is pro hacker, also I'm pretty sure everyone of us know difference between DoS and DDoS attacks.
Yooo. We are playing mix matches 5on5 in evening hours on the server CS2D.TK | Mix/Match, you can join us, server password is match. Statistics, leaderboard can be found under the following link.
To the start Previous 1 Next To the start