ᓚᘏᗢ Oct 20, 2022 @ 12:36am
LAN Servers are Restricted to Local Clients (Class C)
I tried to host a L4D2 dedicated server to play with friends.

My server has a ip with 172.16.4.2, and the launch option is:
./srcds_run -game left4dead2 -ip 172.16.4.2 -port 27015 +sv_clockcorrection_msecs 25 -timeout 10 -tickrate 100 +map c1m1_hotel -maxplayers 16 +servercfgfile server.cfg +lan 0 -nomaster"
And I added sv_lan 0 into the server.cfg following the guide there: https://help.steampowered.com/en/faqs/view/58CB-73CB-1709-6182

The server is using a internal IP but another internet(public) IP is forwarding all traffic to it from the router, everything should work properly. Then I tried to connect to it from the internet using the public IP x.x.x.x, then it kept disconnect with the warning "LAN Servers are Restricted to Local Clients (Class C)" #Valve_Reject_LAN_Game.

When tried to set up a CS1.6 server, I got the same issue. Though the port forwarding and server are working properly, this problem prevents players from joining the game.

Do I have some methods to force the server to run as a Internet Server?
Originally posted by Sepp:
Found this Wiki: https://wiki.teamfortress.com/wiki/Linux_dedicated_server#Troubleshooting
According to this you need to make sure you have a steam_appid.txt file in your diectory. In your case the number needs to be 222860.
< >
Showing 1-5 of 5 comments
Sepp Oct 20, 2022 @ 2:04am 
Are you sure the "sv_lan 0" setting is working? Cause the error message implies the server is still running as a lan server.
Type "status" in console or "sv_lan" and see if the outputs give any hint.
If that seems to be fine try to remove the -ip command from the startup commandline and see what happens then.
ᓚᘏᗢ Oct 20, 2022 @ 3:48am 
Originally posted by Sepp:
Are you sure the "sv_lan 0" setting is working? Cause the error message implies the server is still running as a lan server.
Type "status" in console or "sv_lan" and see if the outputs give any hint.
If that seems to be fine try to remove the -ip command from the startup commandline and see what happens then.

status hostname: Test Server version : 2.2.2.5 8491 insecure (unknown) udp/ip : 172.16.4.2:27015 [ public n/a ] os : Linux Dedicated map : c1m1_hotel players : 0 humans, 0 bots (4 max) (hibernating) (unreserved) # userid name uniqueid connected ping loss state rate adr #end sv_lan "sv_lan" = "0" - Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )

Thanks dude, everything seems fine except it's a LAN server. I've removed the -ip launch option but still got a same output&error.

After checking the log, I'm sure the issue is from there:
* Unable to load Steam support library. * * This server will operate in LAN mode only. *
My server is running Debian 11 64bit, not sure how to fix it.
Sepp Oct 20, 2022 @ 4:43am 
Have u used a steam client installation on this machine before...or still using it as a client also?
I remember that on windows this was causing issues in the past and you had to clean up the registry to fix it. Don't know if this applies to linux aswell though...

To rule out any problems caused by options I suggest to give it a try with a minimal startup commandline:
./srcds_run -game left4dead2 +map c1m1_hotel +servercfgfile server.cfg

Also...if not done yet...try to validate the installation.
The author of this thread has indicated that this post answers the original topic.
Sepp Oct 20, 2022 @ 10:02pm 
Found this Wiki: https://wiki.teamfortress.com/wiki/Linux_dedicated_server#Troubleshooting
According to this you need to make sure you have a steam_appid.txt file in your diectory. In your case the number needs to be 222860.
BAD *Man Nov 16, 2022 @ 1:55pm 
try
-console -game left4dead2 -maxplayers 8 +sv_lan 0 +map c5m1_waterfront

read also please
https://steamcommunity.com/discussions/forum/13/558746089493486352/
< >
Showing 1-5 of 5 comments
Per page: 1530 50