--- title: "How to Run a CS 1.6 Server Behind NAT / a Home Router" excerpt: "How to make a CS 1.6 server hosted behind a home router reachable from the internet: forward UDP 27015, bind the right IP, disable LAN mode, and work around double-NAT and CGNAT." category: "installation" tags: "nat, port-forwarding" image: "" read_time: "8 min read" ---

Hosting a CS 1.6 server on a machine behind a home router means the server has a private LAN address (like 192.168.1.50) while the internet only sees your router's public IP. Nothing reaches the server until you tell the router to forward the game traffic and tell the server to advertise itself publicly. This covers port forwarding, the cvars that matter, and the two situations — double-NAT and CGNAT — where a home connection genuinely cannot host without help.

1. Give the server machine a static LAN IP

Port forwarding points at one internal address, so that address must not change. Either set a static IP on the server machine or create a DHCP reservation in the router keyed to its MAC. If the machine's LAN IP drifts from .50 to .51 after a reboot, your forward now points at nothing.

2. Forward the game port on the router

CS 1.6 uses UDP 27015 by default. In the router's port-forwarding section, add a rule:

Protocol:    UDP
External:    27015
Internal IP: 192.168.1.50   // your server machine
Internal:    27015

UDP is the game traffic and is mandatory. Forward TCP 27015 as well only if you use RCON over TCP or run an HLTV proxy on that port. If you run multiple servers on 27016, 27017, and so on, forward each of those UDP ports too.

3. Leave LAN mode off

A server with sv_lan 1 refuses outside connections and never registers with the master list. In server.cfg:

sv_lan 0

This is required for the server to be reachable and listed publicly, exactly as on a VPS.

4. Bind and advertise the correct IP

By default HLDS binds all interfaces, which is usually fine behind NAT. The mistake is forcing the private address on the command line. If you pass +ip, it must be the machine's LAN IP for binding — never the public IP, which the machine does not own:

./hlds_run -game cstrike +ip 192.168.1.50 +port 27015 +maxplayers 16 +map de_dust2

In most home setups you can omit +ip entirely and let it bind everything. Players connect to your public IP; the router translates that to the private one via your forward. See the command-line parameters guide for the full flag list.

5. Test from outside your network

You cannot properly test from inside your own LAN — many routers do not loop a public-IP connection back inward (no NAT hairpinning), so it "fails" from your own PC while working fine for everyone else. Have a friend connect to your public IP, or use a phone on mobile data:

connect YOUR_PUBLIC_IP:27015

Find your public IP from the router's status page or any "what is my IP" service, not from the server machine's ifconfig, which shows the private one.

6. Handle double-NAT and CGNAT

Two common home situations block hosting even with a perfect forward:

Common errors

Verification

From an outside network, run connect YOUR_PUBLIC_IP:27015 and confirm you join. Then check the server appears in the internet server browser once sv_lan 0 has propagated. If the connection times out from outside but the server console shows it running, the traffic is being dropped before the machine — walk back through the forward, the double-NAT check, and finally the CGNAT test. For anything more than a small private server, a VPS install avoids all of this.