Setting up a Linux non-Steam Counter-Strike 1.5 Server

Last update: Wed Feb 1 01:32:01 EST 2006

Most of these are the same instructions you can find on the "noWON CS1.5 server" page over at No WON. I have simplified, reorganized and rephrased them so that (hopefully) they will make better sense.

Once you've followed these instructions your server will be accessible from the internet via the WON2 network. Be sure to patch your client with the No-WON / WON2 Patch for Players then use the in-game browser to find your server.

ServerInfo (Win32) is very useful for keeping tabs on your server while you are doing other things.

  1. Get the following packages:

    The above links have all been localized, so the files should always be there.

  2. Extract the above files in the order they're listed. Customize the configs and add your mods (AMX, etc.) If you don't know how to do this you can find the basics in the Linux CS Server How-To on Counter-Server. If they remove it I've got a copy archived here.

  3. Replace /hlds_l/valve/valvecomm.lst with this file

  4. If any of the following describes you:

    Then edit /hlds_l/cstrike/liblist.gam and change secure "1" to secure "0"

    If instead of the above options you intend to use WON2VAC then leave liblist.gam alone. Note that WON2VAC will ban anyone running the Cheating-Death client who attempts to connect to your server.

  5. Create a file in /hlds_l/ called nowon.c with just one line: int NET_IsReservedAdr(){return 1;}

    In the same directory, type these commands:

    1. gcc -c nowon.c -o nowon.o
    2. ld -shared -o nowon.so nowon.o

  6. Edit /hlds_l/hlds_run and under the first "export" line add this:

    export LD_PRELOAD=/.../hlds_l/nowon.so
    Be sure to substitute the full path to your hlds_l directory in place of the "...".

  7. Edit the script you use to start your server and add +sv_lan 1 to it.

  8. Now you should have a working server. Unfortunately HLDS 3.1.1.1 has a known security hole that allows anyone to crash it. You may want to start your server anyway and join so that you know it works, then shut it down and follow the rest of these steps to patch this hole in HLDS.

  9. Download this file to your /hlds_l/ directory (It comes from this site).

  10. In /hlds_l/ type the following command:

    gcc -s -O3 -D_GNU_SOURCE -fPIC -shared -ldl -o hlds_20040707fix.so hlds_20040707fix.c

  11. Edit /hlds_l/hlds_run and change the "export" line you created in step 6 to this:

    export LD_PRELOAD="/.../hlds_l/nowon.so /.../hlds_l/hlds_20040707fix.so"
    As before, be sure to substitute the full path to your hlds_l directory in place of both "...".

  12. Your server is now working and slightly more secure. You can add more security by incorporating the chroot patch from the site in step 9 and running HLDS in a "chroot jail". Compiling and using the HLDS chroot patch is easy, however creating the jail is beyond what I have spare time to deal with right now (let alone document). If anyone has some good instructions for this please post them to the Steamless CS Project Forum.