• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Critical problem in OTServ

Nostradamus

Member
Joined
Jun 2, 2007
Messages
219
Reaction score
6
Ok, i've resolved make this public. This was posted in private development forum on OTFans, but i think it is good to warn everyone about this problem. Remember that this was solved some time ago by Sim0ne, but old servers still can have this bug.

The problem

All OTServs accepts one connection and never desconnects until they recieves the first packet from the client, with that, this connection remains active. The default timeout from system activation is 2 hours. After that period, the system closes the connection if there is no send(). So, the server waits for a send() but this will not be sended. A spam attack from 5 minutes with 60 connections per second results in socket error or memory leak.

Bandwidth

It's quite easy to crash a server using only 20kb/s upload.

Avoiding

Professional firewalls can avoid those calls, like CISCO GUARD or some anti-Ddos services from max security. In general, it is so hard to find that on OTs, because of the price. And this can only prevent in Linux servers or making a server that uses close() in the connection after 10 seconds of waiting.

The system cannot work on Windows, since it uses sockets at the same level of the network hardware, something that Windows does not give possibilites since it might crash while handling if so many sockets. In *nix systems, there is a kernel API for socket sending.

NAT modems and active firewalls can crash with so many connections, since NAT tries to proccess all those connections.

Since there is socket usage in a lower level, Linux kernel thinks that those bytes are strange, and then, closes the connections since it is unknown (does not appear on the socket register of Linux). For that, you have to create rules for the Linux firewall not block it.

Time

The success time of an attack depends of the internet, firewall and computer configurations, but we can say that 99% of the servers are with that problem in the time of that was written.

Program

Since to make that we need to edit TCP/IP directives, and Windows does not allow precisely, it is only possible to make for *nix systems. Dark-bart did that and tested with a lot of servers to comprove this theory.
 
prob not... couse i hate linux i hade that in school....
any other channs this can be fixed in 0.3.5pl2 or 0.3.6?
 
You guys got the message wrong: elf said the TFS versions *not* affected by that and Remere said that *before* OpenTibia rev 4000 the problem is there.
 
well i just hate linux.
Great answer and very mature to hate something without a reason tbh, I can ensure you that you are on the right way to make your otserver stable.... n0t

You guys got the message wrong: elf said the TFS versions *not* affected by that and Remere said that *before* OpenTibia rev 4000 the problem is there.

Not me, i just wanted to know why does he hates linux
 
okey good but there is a bug in the server distro about telnet lol...
 
Back
Top