Topic: [MOD] real RCON - with gnuTLS security
Hi,
this is a mod for a real remote console, which means: no need to start up the game to control your dedicated server.
It's using gnutls for server side encryption. If you don't know how to set this up, don't waste your time here - this is not intended to be user/idiot-friendly.
Config vars:
sv_rr_port -- the port for your remote console (see below explanation), default is 5556
sv_rr_maxcon -- maximum number of connections allowed, default is 5
sv_rr_sslkey -- path to your x509 private key in PEM format, defaults to ""
sv_rr_sslcert -- path to your x509 public certificate in PEM format, defaults to ""
sv_rr_sslca -- path to a CA you trust for signing client certificates (most people will want their own here), defaults to ""
sv_rr_sslcacrl -- path to the certificate revocation list (CRL) of the above CA, may be omitted, defaults to ""
Using:
Once the server is started up you should see a line like:
[48e8f598][rrcon]: Server ready. Listening to port 5556
Now you can connect to that port. I currently use socat (Linux), but any other SSL capable plain TCP/IP "client" will do.
$ socat - SSL:$IP:$PORT,cert=$YOUR_CLIENT_CERTIFICATE,key=$YOUR_PRIVATE_KEY,cafile=$PATH_TO_SERVERS_CA
IP/PORT is self-explanatory
YOUR_CLIENT_CERTIFICATE is the client certificate that will be used for encryption and verification
!!important: the CA from the server's configuration has to be the issuer of the above certificate!!
YOUR_PRIVATE_KEY is the private key for the above certificate
PATH_TO_SERVERS_CA is the CA that signed the server's certificate
Now you have to enter your sv_rcon_password and the server should answer with "authentication successful".
Now you have full rcon access to your server.
http://k.pentabarf.de/teeworlds-0.4.3-rrcon.patch
Apply with patch -p1.
Though testing went quite well, I don't think I could wipe out all sources of segfaults (duh!) so use at your own risk. When you build the server, please build the debug version (bam server_debug) to be able to provide backtraces just in case.