Hosting Counter Strike – How to Specify the Network Adapter for a Counter-Strike 1.6 Dedicated Server

counter-strikehosting

I configured my cstrike 1.6 server and I think everything should be fine now, but the server is still not working.

And I'm thinking that the problem is that the server is configured to listen for incoming connections on my Ethernet network adapter (because when I launch HLDS, It shows 192.168.81.1:27015 as the IP Address, which is the local IP address that my Ethernet adapter has), while I'm actually connecting to the internet using my wireless adapter (Which is having a local IP address of 192.168.1.6 right now, and this is the IP that I was expecting to see in HLDS).

So, how could I change my HLDS settings so that it listens on my wireless adapter and not my Ethernet one ?

Best Answer

You can simply pass in the +ip parameter while running the dedicated server like this:

./srcds_run -arguments_you_already_have1 +arguments_you_already_have2 +ip 192.168.1.6

That +ip parameter will tell the server to bind on a specific address, hence the network interface you want. Assuming the relevant port forwarding or bridge configuration is done on the router, you should be good to go.