Commands/Lua

Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

Category: server (201)

CS2D Command mp_connectionlimit

Categories

Parameters

  • limit (8-4096): How many connections are accepted max.? (default 64)

Info

High Security Relevance
This setting is important for the security of your server!
Use it carefully! Wrong settings may make your server vulnerable or limit its functionality or accessibility!

Controls how many concurrent UDP connections are allowed by the server.

UDP Connections are required for 3 things:

  • For players playing on the server (1 connection per player)

  • For players who load the serverlist and want to see the server (1 connection per player)

  • To be able to talk with the U.S.G.N. masterserver for serverlist entry and account verification (1 connection)


If the limit is reached, the server will not accept any new connections. This means, that nobody will be able to see the server in the serverlist anymore. Moreover Nobody will be able to join it anymore. This setting does not affect already established connections (e.g. players already playing on the server).

The MINIMUM value for this setting should always be max player count + 1. e.g. 17 if you have 16 players on your server. If you use this value however, nobody will be able to see your server in the serverlist anymore as all connections are in use and no new connection will be accepted. Therefore it's highly recommended to use a higher value.

The default value is 64. Going lower is not recommended unless you have problems with DDoS (distributed denial of service) attacks. Very high values are also not recommended as they can make your server more vulnerable to DDoS attacks.

Technical background:
UDP is a stateless protocol but CS2D works with a lightweight stateful protocol on top of UDP for reliable data transfer. To make that possible it establishes a virtual connection for each address it receives messages from or sends messages to. This virtual connection saves some state values like packet IDs, queues for reliable packets etc. Maintaining these virtual connections costs memory and CPU time. If attackers send many UDP messages from different sources (DDoS attacks), they can enforce the creation of many virtual connections which can slow down or even crash the server.

Note: You can use the connections command to get a list of all virtual UDP connections which are currently in memory.

Attention: Using a LOW connection limit might make your server inaccessible to new players, hide it from the serverlist or make U.S.G.N. verifications impossible!

Attention: Using a HIGH connection limit might make your server more vulnerable to DDoS attacks!

Lua Hook Lua Hooks

Lua Command Lua Commands