nn_skinl
nn_lb1
nn_mobile_lb1

CodControl

codcontrol_0.0.2.zip

Description

New in version 0.0.2 - Connection to the daemon now is tls / ssl encrypted - now you can define wich ip's could connect

What is CodControl? Cod_control is a webinterface to start or stop gameservers. It works not only with Call of Duty, as the name suggests, it works with every linux gameserver that uses a screen process.

How does CodControl work? Cod_control consists of two parts. 1st: The linux service (daemon) that the screen process stops and starts. 2nd: The webinterface which is access the Linux daemon. The webinterface handles more then one gameserver. It is also possible not only to manage local servers, but also remote some gameservers. The encrypted transmission is also improve security. In addition you should give the server the ip's of the server

nn_lb2

README

.---------------------.
| New in version 0.0.2 |
'---------------------'
 - Connection to the daemon now is tls / ssl encrypted
 - now you can define wich ip's could connect

	
.-------------------------.
| What is 'cod_control '? |
'-------------------------'
Cod_control is a webinterface to start or stop gameservers.
It works not only with Call of Duty, as the name suggests,
it works with every linux gameserver that uses a screen process.


.-------------------------------.
| How does 'cod_control work '? |
'-------------------------------'
Cod_control consists of two parts.
1st: The linux service (daemon) that the screen process stops and starts.
2nd: The webinterface which is access the Linux daemon.
The webinterface handles more then one gameserver.
It is also possible not only to manage local servers, but also
remote some gameservers.
The encrypted transmission is also improve security.
In addition you should give the server the ip's of the server
on which the interface runs.


.--------------------.
| Some security tips |
'--------------------'	
An additional network service is always 'security risk'!
To make life as safe as possible keep the following tips
for your security:
1st NEVER start the daemon as root! Start him only to the user
    that was uses by the gameserver.
2nd Uses the variable 'ALLOWED_SVR' to make sure that only desired
    programs will be started!
3rd I recommend to set the daemon only accept LOCALHOST (ALLOWED_IP=["127.0.0.1"]) requests
    or, if you use external connection, you should list the ip of the server which runs the interface!


.----------------------------------.
| Installation of the Linux daemon |
'----------------------------------'
To install, you need a shell access and FTP, SFTP and SCP
access to upload the files.

you need also the following packets:

    python
    python-pyopenssl


Sign up with the user which your server usually start the gameservers.
If you have one user for each gameserver you run, you must repeat the
installation for each user. For each user you need one daemon startet!
Create a directory in which we can copy the files:
E.g.:
       mkdir cod_control

Copies now 'cod_control.sh' and the 'cod_controld.py' in the newly created directory.
Now we go to the directory and make the files executable:

       cd cod_control
       chmod-R 755 *

Now we create the key for the SSL encryption:

        openssl req -new -x509 -keyout server.pem -out server.pem -days 0 -nodes

'-days 0' means that the key never expire.


Now we have to do the settings in the 'cod_controld.py'.
As an example, i use a CoD2 server in the directory /home/gamesvr/cod2.
The daemon is in the directory /home/gamesvr/cod_control. To edit a the file
use a linux compatible editor! E.g. 'mcedit'.

   PWORD = 'example' <-- Here comes the password

   ALLOWED_SVR = [&quot;cod2_lnxded&quot;] <-- Where the allowed executables.
                                      You can also specify more in the case like: [ &quot;exec1&quot;, &quot;exec2&quot;, &quot;exec3&quot;] etc.
                                      This information is used for security so that no other programs can be startet!
 
   ALLOWED_IP = [&quot;127.0.0.1&quot;] <-- [&quot;127.0.0.1&quot;]=connection only from the localhost (the server itself) are allowed.If you put
                                a [&quot;0.0.0.0&quot;] in the field every client can connect (not very secure!). Otherwise you
                                can define the ip's of the server/s. For example: ALLOWED_IP=[&quot;127.0.0.1&quot;, &quot;11.22.33.44&quot;, &quot;55.66.77.88&quot;]... 

   NET_PORT = 4100 <-- The port on the daemon responding to requests. If you have a firewall and external access
                       this has according to be opened for TCP access!

   LOGFILE = '/home/gamesvr/cod_control/cod_controld.log' <-- The LOG file of the daemon. Must be the entire path!
 
   LOGTYPE = 1 <-- amount of log infos:  2=less | 1=normal | 0=debug
 
   PEMFILE = '/home/gamesvr/cod_control/server.pem' <-- The key file for the ssl encryption

   PIDFILE = '/home/gamesvr/cod_control/cod_controld.pid' <-- The PID file of the daemons. Must specify the full path. Do NOT
                                                              delete the pid-file! Otherwise the daemon may not stopped properly!

   SCREEN_PID = '/var/run/screen' <-- Hare are the PID's from the screen processes saved. On Debian this is the
                                      normal directory. Other distributions may differ!

Controlling everything and then Save.
Now we can start the daemon:

  ./cod_control.sh start


.-----------------------------------.
| Installation of the Webinterfaces |
'-----------------------------------'
You need PHP 4.3 or higher.

To install, you need an FTP, SFTP and SCP access to upload the files.
Copy the contents of the folder 'html' on your Web server. Opens the file 'config.php'.
We must now turn some settings.


   $usern = &quot;&quot;; <-- Your username here
   $pass  = &quot;&quot;; <-- and your password

   $encrypt = &quot;tls&quot;; <-- Der Verschlüsselungstyp. Möglich sind: tls, ssl, sslv2 und sslv3. Die Möglichkeiten hängen
                         vom Webserver ab. Wichtig das die Verschlüsselung mit dem Daemon übereinstimmt!

   $sel_lng = &quot;english&quot;; <-- The desired language. Currently, german (german) and english (english) are supportet.


             .-------- If you have multiple servers you need to set to 1 then 2 an so on.
             |         The sorting in the webinterface depends on the order here! Not according to the numbers!
             |         
             V
   $game_svr [0] [name]        = &quot;Call of Duty 2&quot;; // This name will appear on the webinterface
   $game_svr [0] [ip]          = &quot;localhost&quot;, 	   // IP address of the server on which the daemon is running.
   $game_svr [0] [port]        = &quot;4100&quot;,           // the port we have setup.
   $game_svr [0] [pass]        = &quot;example&quot;,        // our top elected password
   $game_svr [0] [screen_name] = &quot;cod201&quot;;         // the screen process name
   $game_svr [0] [path]        = &quot;/home/gamesvr/cod2&quot;; // directory of the server
   $game_svr [0] [executable]  = &quot;cod2_lnxded&quot;,    // the executable server file. Must match with one of the
                                                   // executables above in 'ALLOWED_SVR'
   $game_svr [0] [options] = &quot;+ 2 + set dedicated set sv_punkbuster 1 + exec sd.cfg set net_port + 28960 + map_rotate&quot;, // the start options of the server

With additional servers accordingly. Stay pointed that the name in '$game_svr[0][screen_name]'
dont repeat and do not forget for the next server has a diffrent numbering! For an example see in the 'include.php'

If all goes well you should now start and stop your gameserver over the webinterface .

Have fun.

Fraiser

[email protected]
Http://www.masterzock.de

There are no comments yet. Be the first!

nn_skinr