sv_lan = 0, Class C clients only.

I google’d, alot, to find a solution for this problem. I found the problem several times on the internet now, but I never found a solution that works.

I have installed hldsupdatetool (windows) on a linux server through Wine. Installed Garrysmod with a couple of addons like Wire, PHX, etc.

I setup the server.cfg with a hostname, sv_lan “0”, sv_region “3”.
I also start the game with a -ip and a -port.

I also opened the ports 27005 tcp/udp and 27015 tcp/udp

The game launches fine, it shows up in (favorites tab) with a latency and the rcon is reachable through HLSW.

But when I ask about “sv_lan” it shows:
15:37:42 “sv_lan” = “0”
- Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )

And when I join the server (non-LAN) I get the same error “Class C clients only”. So the server is actually reachable, but doesn’t let me in.

I don’t know what to do anymore, anybody a solution?

What’s happening is you’re attempting to join the server as a LAN IP address. If you use the server’s external IP address, you should be fine.

You need to make sure your networking is going out (blue) to the internet, then coming back in (orange) through the router. Don’t connect through lan (red).

Don’t forget to forward your ports to whatever machine the server is on.

I know that. I have a dedicated server myself at a internet provider. So, it isn’t even physically next to me. I only can enter with the external address. But the problem is, if I would join the server with it’s LAN address, it should work, because the server says only LAN clients can join.

The output of “sv_lan” below is just what the cvar does when enabled:

15:37:42 “sv_lan” = “0”

  • Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )

When set to 1, sv_lan makes the server lan-only (ie, it stops non-LAN addresses from connecting. If your server isn’t on your local lan, you can’t use a lan IP to get to it normally. You need to use the external IP.