Sunday, February 15, 2009

Connect to Private Dedicated Server through a Lobby

Well I have tried to do this on and off for a little while now and found a post by MaxRabbit that works for me.

My server config is pretty bare at this point:

server.cfg:

hostname "l4d"
rcon_password "*************"
mp_disable_autokick 1
sv_voiceenable 1
sv_allow_lobby_connect_only 1
sv_region 1
log on
sv_clearhinthistory 0

Server start script:

./srcds_run l4d -secure -maxplayers 4 +hostport 27015 +map l4d_hospital01_apartment +exec server.cfg +sv_lan 0

To connect from a Lobby this is what you do ...

First launch L4D and open up the console and type:

sv_cheats 1
ms_force_dedicated_server x:y

Here x is your WAN IP address and y is the game port (i use 27015).

Close the console and then set your lobby options as normal and the lobby will connect directly to your server!

I am not sure why the sv_search_key way of achieving the same end is not working for me but this will do just fine ...