Counter-Strike

Counter-Strike

93 ratings
Play CS 1.6 with your online friends on your PC
By M R 7
This is a Counter Strike 1.6 dedicated server quick guide to allow you to host your games and play with your friends. We will go through the complete process from preparing your network to inviting your friends.
   
Award
Favorite
Favorited
Unfavorite
What you need to know
I hope you enjoy this guide, rate and refer it to people that would find it useful.
That would help the guide visibility. Thank you.

This guide will require you to have administration rights to your router for configuration.
We will go through the details required and hopefully anyone can follow them.

A few things might not make sense to you depending on your expertise, follow along and you should be okay. You can always post questions in the comments section.

Some Internet service providers (ISP) might block ports (Inter-connectivity doorways) or applications, an unlikely case. You can contact them to change said settings or you would need to change providers.

Most routers do not support network address translation (NAT) loopback (hairpinning). We will access our server with the local address and ask a remote friend to test the external address. I will clarify the steps later on.

As a quick guide, I will keep steps or instructions to the minimum in a simple format.
If there are unclear details, corrections or recurring questions in the comments section, I will make sure to add them to the guide.

Let's get started.

Your computer setup
Whenever possible, use a wired connection for faster communications between the server and different players.
  1. In your file explorer, in the left section, you will see "This PC"
  2. Righ-click on it and select "Properties". "System" window will open up
  3. In the left section click on "Advanced system settings". "System properties" will open up
  4. Select the "computer Name" tab located at the top left
  5. Click the "Change" button to change the computer name
  6. Change said computer name to something easy to identify, and take note of it
  7. Click "Ok"
  8. You will be prompted to restart now or later. Choose restart later
  9. In the "Start Menu" type cmd
  10. Open the "Command prompt"
  11. Type "ipconfig/all"
  12. Scroll up to the "Ethernet adapter" if you are using an ethernet cable or "Wireless LAN" if you are going wireless
  13. There should be a "Physical Address" in this format : 0A-0B-12-0C-0D-34. Take note of it
  14. Now you can restart your PC for the name change to be in effect
This will conclude the PC configuration.
Your router setup
Let's try and access the router administration page through your favorite WEB browser.

IP access addresses are mentioned on a sticker on your router.
You can also refer the PDF manual of your specific router model.
A quick way is to try these default ones :
Keep in hand the administrator credentials to log in. They should be mentioned on the same sticker.
You can always try "admin" and leave the password empty or try "admin" for this field too. These credentials would also be mentioned in the manual PDF.

Let's begin.
  1. Open the appropriate router "Administration page".
  2. "Open a session" or "Log in" using the administration credentials.
  3. You might find a "My devices" section. If not head to the "DHCP" (Dynamic host configuration protocol) settings.
  4. Lookup your PC if there's a list, otherwise we will add it manually. The name and physical "MAC" address obtained in the PC configuration will be helpful here.
  5. Set a fixed IP, should be in this format : 192.168.x.xx
  6. Save or Apply if there are buttons for it.
  7. Now we will head to the "Port forwarding" settings. It could be located under the "Advanced settings" section.
  8. We will create a "Rule" using these values :
    • Name - HLDS
    • Protocol - Both
    • Internal Ports - 26900 27100
    • External Ports - 26900 27100
    • IP/MAC - Use your specified IP or your MAC address
  9. Save or Apply if there are buttons for it.
  10. You can now close the session/logout and close the browser.
This will conclude the router setup.
Installing the dedicated server
Let's get the HLDS (Half life dedicated server) installed on our machine.
  1. Head over to : https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD
  2. Download "steamcmd.zip"
  3. Extract the file in an easy to find location, we will use : "C:\steamcmd\"
  4. Launch "steamcmd.exe"
  5. After verifications and updates you will get a prompt like this : "Steam>".
    Type "login anonymous" and enter.
  6. Type "force_install_dir ./cs_1_6/" and enter.
  7. Type "app_set_config 90 mod cstrike" and enter.
  8. Type "app_update 90 validate" and enter. This triggers the installation process.
  9. After the install/update is done without errors you can close the SteamCMD window. If you have encountered errors, try "app_update 90 validate" a few more times. It's a known bug.
This will conclude the DS installation.
Preparing security measures
Before we go any further we will need to secure administration and access to the server.
  1. Using the File browser head to "C:\steamcmd\cs_1_6\cstrike"
  2. Open the file "server.cfg", notepad will do the trick
  3. Make sure you have these lines in your file

    // remote console password
    rcon "admin_password"

    // players connect password
    password "friends_password"

  4. Most importantly change "admin_password" and "friends_password" to different passwords.
    Do not leave them as they are in this guide.
  5. Feel free to alter other commands to your preferences otherwise we're done here
  6. Save the file
Time for the next section.
Dedicated server setup
Time to do the server configuration.
  1. Head over to your HLDS installation folder : "C:\steamcmd\cs_1_6\"
  2. Right click on "hlds.exe" and "Send to" > "Desktop" to create a shortcut
  3. You can close the file explorer and go to the "Desktop"
  4. Right-click on the shortcut you've just created and select "Properties"
  5. You should land on the "Shortcut" tab. In the target field add this at the end of the line :

    -console -game cstrike -autoupdate -condebug -conclearlog -sv_lan 0 +maxplayers 10 +map de_dust2 +port 27015 +ip YourLocalIP

    Mind the blank between "hlds.exe" and "-console" and also your local IP, the line should look like this :

    C:\steamcmd\cs_1_6\hlds.exe -console -game cstrike -autoupdate -condebug -conclearlog -sv_lan 0 +maxplayers 10 +map de_dust2 +port 27015 +ip 192.168.x.xx

    Alternatively you can change your internal IP to your external one. Use https://www.whatismyip.com/ to find it out or "cmd" "ipconfig/all"

  6. Click "Apply"
  7. Click "Ok"
  8. Launch the server using the shortcut
  9. A firewall pop-up will be displayed for the first time, Allow your server.
    You can always go later to "Windows settings" > "Network & Internet". In "Status" click on "Windows firewall" > "Allow an app through firewall"
  10. You can close the server but we will keep it open for the next section : playing with your friends.
This will conclude the server configuration.
Playing the game with your friends
Let's get the server running first.
  1. Launch the server using the desktop shortcut
  2. Launch CS 1.6 through Steam
  3. In-game click on "Find Servers"
  4. Select the "Favorites" tab
  5. Right-click and click on "Add server by IP address"
  6. Type in YourIPAddress and 27015 as a port. It should look like this :
    192.168.x.xx:27015
    Alternatively you can try your external IP (Your router would require NAT loopback)
  7. Click "Add this address to favorites"
  8. Double click your server in the list to join it
  9. Bring up the Steam overlay using "Shift+Tab"
  10. Open the friends list
  11. Right-click on a friend
  12. Click invite to lobby
  13. Give your friend the password needed to join
You can also tell your friends to add your server to favorites from the history tab, after they have joined you once.
Troubleshooting and references
Common things you can do for troubleshooting :
  • Restarting your PC
  • Restarting your Router
  • Consulting the Router PDF manual for details
  • Checking the dedicated server text log file : C:\steamcmd\cs_1_6\qconsole.log
  • Using the DMZ settings of your router only for testing incoming connections
  • Verifying your external IP with https://www.whatismyip.com/
  • Verifying your internal IP with "cmd" "ipconfig/all"
  • Verifying double NAT problems with traceroute "cmd" "tracert 8.8.8.8"
    8.8.8.8 is Google's DNS Server. If you see more than one private address (192.168.0.0 to 192.168.255.255 range or 172.16.0.0 to 172.31.255.255 range or 10.0.0.0 to 10.255.255.255 range), you are having multiple networking equipment handling Network Address Translations. This causes port forwarding issues.
For reference :
Closure
I hope this guide was simple and helpful.

Don't forget to rate this guide and refer it to people that might need it.
Feel free to ask for help or suggest additions in the comments section.

Thank you for reading and your patience, this was lengthy despite my efforts.
Asked questions
  1. davidR.V asked : Hi, it works on Half Life?
    Answer :

    Here are the changes I did for Half-Life Death Match :

    Installing the dedicated server
    ...
    6. Type "force_install_dir ./hl_dm/" and enter.
    7. Type "app_set_config 90 mod valve" and enter.
    ...

    Preparing security measures
    ...
    1. Using the File browser head to "C:\steamcmd\hl_dm\valve"
    ...

    Dedicated server setup
    ...
    1. Head over to your HLDS installation folder : "C:\steamcmd\hl_dm\"
    ...
    5. You should land on the "Shortcut" tab. In the target field add this at the end of the line :

    -console -game valve -autoupdate -condebug -conclearlog -sv_lan 0 +maxplayers 10 +map crossfire +port 27015 +ip YourLocalIP
    ...

    Playing the game with your friends
    ...
    2. Launch Half Life through Steam
    ...

    Troubleshooting and references
    ...
    . Checking the dedicated server text log file : C:\steamcmd\hl_dm\qconsole.log
    ...
34 Comments
Reitzel Oct 26, 2023 @ 3:15pm 
@M R 7 thank you for a great guide! I've also added you for the same reason as @bob and @stealthycmdd
bob Jul 21, 2023 @ 11:46am 
@M R 7 Im having the same problem as @stealthycmdd I added you for some help if possible.
Thanks for the guide!
stealthycmdd Jan 9, 2022 @ 9:42am 
@ M R 7

thank you.

you can hit me up in chat when you're free.
M R 7  [author] Jan 8, 2022 @ 6:47am 
I added you on steam to look into it when I get the chance.
stealthycmdd Jan 2, 2022 @ 8:47am 
@ M R 7

I've followed the instructions in your guide step by step but at the end there's no "invite to lobby" option available in the steam overlay/chat at all !

nevertheless, i asked my friend to try to connect to my server either using : 192.168.x.xx:27015 (my IPv4 address+port) or my public IP + port.

but none of those options worked and it kept saying retrying to connect to server.


so, i really dont know what I'm doing wrong here...

am i using the wrong IP address ? am i giving the wrong IP address for my friend to connect ? i dont know...


i tried the guides below as well, but still no result and each seems to have a different approach to start the dedicated server....

any help would be really appreciated.

Play CS 1.6 with your online friends on your PC
By M R 7


Counter-Strike: 1.6 Dedicated Server (SteamCMD) [English/Englisch] [Windows]
By Zeromix and 1 collaborators


Starting a Dedicated Server
By sabian
M R 7  [author] Sep 24, 2020 @ 11:12am 
XD I'm afraid so...
zerx Sep 24, 2020 @ 11:10am 
it looks like i need to hack valve
M R 7  [author] Jun 2, 2020 @ 12:50am 
Thank you Elite :)
GOLDEN- Jun 2, 2020 @ 12:32am 
+Rep
M R 7  [author] May 18, 2020 @ 6:03am 
Thank you very much Agent93. I'll verify this and add it to the guide.