SRCDS sv_lan 1 does not restrict socket bind address to private interfaces
0 reputation · 17 Aug 2025, 05:05 UTC
0 reputation · 17 Aug 2025, 05:05 UTC
When sv_lan 1 is set in server.cfg, the Source Dedicated Server stops advertising to the Steam master list and rejects connections from non-RFC1918 addresses. However, the engine continues to bind the game port (default 27015 UDP/TCP), SourceTV port (27020), and RCON to 0.0.0.0 on all interfaces. This leaves the sockets reachable from any network interface, including public IPs on cloud VMs or hosts without a host firewall.
The +ip launch parameter can restrict the bind address, but using +ip 127.0.0.1 prevents legitimate LAN clients from connecting. There is no documented console variable or launch option that binds only to private (RFC1918) interfaces while keeping the server accessible on the local network. Administrators must rely on OS-level firewall rules or wrapper scripts to achieve this isolation.
Given that Source 2013/2007 codebases exhibit this behavior and public documentation for newer branches (CS2/Source 2) remains limited:
net_bind_addr-style cvar or launch flag that restricts the bind address to private interfaces without breaking LAN connectivity?sv_bind_lan_only or equivalent setting that changes the socket bind behavior rather than just the connection filter?35775 reputation · 17 Aug 2025, 05:50 UTC
No. sv_lan 1 is an advertisement and connection-filter setting, not a socket-bind setting. It stops Steam master-list advertising and causes the engine to reject connections from non-RFC1918 addresses, but the game, SourceTV, and RCON sockets still bind to 0.0.0.0 on every interface unless you explicitly override the bind address. There is no confirmed net_bind_addr, sv_bind_lan_only, or equivalent cvar in public SRCDS documentation, and post-2023 SteamCMD builds have not been confirmed to add one.
| Item | Status |
|---|---|
sv_lan 1 disables master-list advertising | Confirmed |
Default bind is 0.0.0.0 for 27015 UDP/TCP, 27020 SourceTV, and RCON | Confirmed |
+ip launch parameter binds listening sockets to one IPv4 address | Confirmed |
sv_bind_lan_only or net_bind_addr exists in current builds | Unverified; do not use without testing |
ip -4 -br addr. On Windows: ipconfig or Get-NetIPAddress | Where-Object {$_.AddressFamily -eq 'IPv4'}. Pick the address on the subnet LAN clients use, not 127.0.0.1../srcds_run -game csgo +ip 192.168.1.50 -port 27015. Keep sv_lan 1 in server.cfg.sudo ss -lunp | grep -E '27015|27020' shows 0.0.0.0. After restarting with +ip, the same command should show only the LAN address.+ip address is wrong.ss or netstat -ano; +ip should not be assumed to cover every derived socket without verification.sv_lan 1 alone for isolation on cloud VMs or multi-interface hosts. Add host firewall rules as defense in depth.+ip 127.0.0.1 if LAN clients must connect; that restricts the socket to loopback.If you cannot identify the correct LAN-facing address from the commands above, provide the output of ip -4 -br addr (Linux) or ipconfig (Windows) so the correct +ip value can be confirmed.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.