Sunday, June 16, 2013

Fedora 18 and CS - Linux Gaming - Setting Up Dedicated server

The day i saw CS:Go released worldwide, I thinking of howto play it. Allfull fledged games are for the windoes and Mac community right!! But luckily Steam took abrave step in brining gaming to bare linux.

This was totaly unexpected for guys like me and what more to ask for a linux cult follower. Thank You Steam..You guys bought CS - community gaming pushing many of my friends over the last decade into gaming .

And among them where many who just bought PC's to play CS in network.. So now steam in linux and CS:Source available in Linux it is possible for me to go back to the collage days...Ya connect my friends at midnight and go rampage in de_dust and de_aztec.

To start with you can directly download the steam client from Fedora repository. Steam is available for almost all the linux flavours.one you get Fedora on steam go to Steam marketplace and buy the games. Currently CS-Source is available in Linux and its paid..:(  . But anyway its just Rs1000 or 20$ which is worth expecially when you are using Linux where your OS and infra are free. For heavily misersyou can check

in PTB(Pirate bay ) for pirated CS. I am damn sure you will find one.

Now once installed you are ready to do the gaming. But for those who already know CS game should be thinnking of passing the IPs getting connected and doing game ..But latetly Steam guys have changed the way we connect to play game together. They now want you to host a dedicated server and get all clients to connect to DS to play game in internet. For LAN based games that is class C ip systems you can directly connect from  the game using the command "connect <ip>"

But we are all grown ups not the hostel guys or combine study era where we gather machines and connect and play in closed LANs. And so i had to setup a CS-DS so that we all could join in during the night hours and do gaming. So went on the task of setting up a dedicated Counterstrike Source server.

Setting up dedciated Server

You may be thinking its too much of technicalities for just playing a game. But thats the cost you have to pay for not spending on hardware like playstation or xbox and on os .Even if you are in windows or mac you will have to setup the dedicated server. So no blame on Linux. Or else you should be contemt with playing cstrike-1.6 the old older version!

 

You can download the steam client which is the basic requirement for setting up any steam based games.from the link . I basically followed the instructions in https://developer.valvesoftware.com/wiki/SteamCMD.

Which is the official steam tutorial in setting up a dedicated server. I initially tried all those blog based tutorials the common one using the HLDSUpdatetool. And found that those where old ways.The current way was

downloading the steamcmd tooland installing the game server.

Once installed steamcmd. Run

./steamcmd

steam> login anonymous

steam> force_install_dir <directory where you need to install>

steam> app_update <gameid>validate   (where gameid for Counterstrike course server is 232330)

steam>quit

The update phase may take up  hourse based on your broadband connection as it downloads GBsof data for thegame server..Once installedyou can start the game server by moving to the

installed directory. But before you start thegameyou may have to put theserver.cfg filewhich configures your server. You can go and get the server.cfgfile from the link . Dontforget to enable the bots!!

Now you can start the game server by using the command

./srcds_run -console -debug -game cstrike -port 27015  +map de_dust2 +maxplayer

Once started you can connect from the CS client using the command connect ~connect <ip>

Some troubleshooting tips:

See to it you have a dedicated external ip for your internet connection. - ipconfig and see the various ips of your interfaces and note down the external ip. now use whatsmyip.org to seewhats your ip from external.

if both are sameyou can assure that your internet connection is via a external ip.In 3g connection most cases you wont be having havingan external ip .  you are under a giant NAT based network.Then you cant host game. I found that airtel andidea are using the above technique. But if you have reliance or bsnl 3g you have chances of getting as ecternal ip.

Check that your ports are accessible via link .

If not then caseis that you r modem acts as a router and you will need to port forward b/w your machine and modem.

Follow the instructions at link to setup portforwarding in your router. You will have default HL2 server setting in most router which isa single clink way for configuring your router for portforwarding. or else theportforword.com sontian instruction for setting up for each type of games.

Firewall is another area where you are going to face trouble. I simply disable it wheneveri go for gaming. I shouldbe finding a better method in the mean time.

Now that everythingis setup you can rjoiceplaing th  CS:Source among your friends with you hosting it.If you are goingto connect from the server thats hosting then you can connect with the internal network ip. That

was inmy case.

 

Non-Steam client

Ifyour friends are windows guys there isevery chance that they would be using a pirated CS game downloaded from TPB. Then they may face issues like

Invalid steam client ticket. Validation rejected

Then you may have to configure the server for accepting non-steam client useres which are basically the pirated once. In this case you can patch your server for allowing non-steam client.You can download the latest patch from - http://rev-crew.info/threads/download-tutorial-how-to-use-revemu.150/ .

And follow the instructions mentioned their. Always see to it that you download the latest patch.

 

Final tips#

Finally also see that all the friends that are connecing are using the same same version as steam updates the games frequently. You can find the version from within the game console using the command

~version

Current versions are based on a update on June18 as of July-1-2013.

Now what!! Go play GOGOGOG!!!

 

You can connect to my server - kalips-css

And i go online between 9pm-2am. For guys in and around tvm are invited as the lag should be less than 100ms.