Vserver

I recently rented a small server for a couple bucks to play around with it for a month. I never had my own server before that and thanks to discord I (for now) have a reason less to do so, since before that you always needed a voip server (like Teamspeak) to talk to people.

Now that I have one I played around with a couple of things like getting my own domain, email server and proxy. Since I already paid for the server and wasn’t up for paying 5 bucks a month to get my own domain I registered a free one which you can get over at freenom, where you can get .ga, .tk and some other tld’s for free. Now those endings aren’t the most appealing ones but they’re free and you’ll have to get a little creative to find some puns like “bazin.ga”.

After that I tried setting up an email server but the amount of work for it made me skip that after trying it for two days. Maybe I’ll come back to it.

Using PuTTY and a remote server as a proxy

The other two things I used the server for so far were a game/VNC server and a proxy which is farely straight forward when using PuTTY:


Just open your configuration and load a session for which you want to have the proxy. Then navigate to “Tunnels” and set “Source port” to whatever the proxy should be accessible on your local machine. The other settings can be left as they are and then hit “Add”. Now after applying the settings and connecting to your server you’ll have a proxy runnying which you can set your browser to. For FireFox you just need to go to settings, then scroll down in the general tab and click “Settings” under the “Network proxy” category. Then select “Manual proxy configuration” and set the “SOCKS-Host” to “localhost” and the port to the one you configured in PuTTY and that’s it.

Setting up a Counter-Strike 1.6 server on debian

When I set up a game server I chose CS 1.6 as a test which should be straightforwards to set up but all tutorials are quite old so I had to do some tinkering to get it working. Here’s what I did for a server running debian:

Set up a new user:

# useradd -g users cs

install dependencies:

# apt-get install libc6 libstdc++6 wget iptables

Add the ports needed for CS 1.6:

# iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT
# iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT

log into the new user:

# su cs

Make a new directory for SteamCMD and download SteamCMD:

$ mkdir steamcmd
$ cd ./steamcmd
$ wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
$ tar xvfz steamcmd_linux.tar.gz

Now you can run steamcmd with “./steamcmd.sh”, but before that verfiy that the version of steamcmd that you have is genuine, since you’ll be logging into your steam account with it. The link above worked for me but if you want to double check you’ll need to do it yourself.

Other tutorials said that logging in as anonymous would work but I had issues when I did that so you can also try that:

# For anonymous login:
Steam> login anonymous
# Or with your steam account (if you have 2fa it'll ask for the code):
Steam> login [username] [password]

Now let’s install and update Half-Life and CS:

Steam> app_set_config 90 mod cstrike
Steam> app_update 90 validate
Steam> app_update 90 -beta beta validate
Steam> exit

You should now have a Steam folder in your home directory. The game should be here:

$ cd ~/Steam/steamapps/common/Half-Life

Inside that you’ll have a file called “hlds_run” use this command to start a CS server (modify some parameters to fit your needs):

$ ./hlds_run -console -game cstrike +port 27020 +de_dust2 +maxplayers 32 -pingboost 1

You can use programs like screen to monitor the CS server since it’ll close as soon as you exit out of PuTTY. When running it might complain that it can’t find steamclient.so, so you’ll have to copy it from “~/.steam/sdk32/” to “~/steamcmd/linux32/” (or the other way around since I don’t remember :P).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s