Jump to content
Sign in to follow this  
zootal

Internet players can't connect to server if no Lan players are in game

Recommended Posts

I vaguely recall hearing about this but didn't pay attention until now. One of my players who connects from the Internet is not able to connect to my server if there are no Lan players in game. I saw this happen last night. I watched the console as they tried to connect, and nothing at all appeared in the console. I then watched a Lan player connect just fine, and after that the Internet player was able to connect.

 

I do not have any protocols disabled:

 

<property name="ServerDisabledNetworkProtocols" value=""/>

 

If I disable SteamNetworking, Internet players can't connect. If I disable LiteNetLib, no one can connect.

 

I can gather and post logs the next time this happens, but when an Internet player tries to join server that is empty, nothing hits the logs. From their perspective, it's as if the server is not up, and the server does not detect the join attempt.

 

Linux dedicated server.

Internet player is using Winbloze.

Share this post


Link to post
Share on other sites

You would only disable SteamNetworking if you have port forwarded properly. LiteNetLib should only ever be disabled for troubleshooting. Having it off will tank the servers network performance.

<property name="ServerDisabledNetworkProtocols" value="SteamNetworking"/> <!-- Networking protocols that should not be used. Separated by comma. Possible values: LiteNetLib, SteamNetworking. Dedicated servers should disable SteamNetworking if there is no NAT router in between your users and the server or when port-forwarding is set up correctly -->

 

Based on the information provided, you haven't forwarded the ports to the server.

Share this post


Link to post
Share on other sites
Posted (edited)

I read that. I have in fact forwarded the ports to the server. I did that a few years ago, and I double checked the config and it is still in place. It's always worked.

 

It's possible I'm missing a port, I currently forward 27666, which is the main server port. So I did a bit of RTFM, and I notice the docs say to forward "26900 TCP" and "26900-26902 UDP". Why does it need the two ports above the main server port (26901, 26902)? Is the lack of those two ports significant? With just the one port, Internet players can see the server and join just fine (if someone is already in the server).

 

Just so that on one can say I don't have it setup right, I'll open up 27667 and 27668, the two ports above the main server port of 27666. A few years ago I ran three servers, and I discovered that a server would not only use the main port specified in serverconfig.xml, but it wanted to use the two ports above it. So I would put each server three ports apart, and that worked great. Since I don't admin the server remotely, and I'm not using Alloc's mods, I did not open 8080-8082.

 

I'll report back the results of opening up those two ports...

 

Edit: In prior version, and TBH not sure if it was earlier A18 or A17, these same Internet players were able to join empty servers. I've not changed my port settings in years, neither the client nor in my router. This used to work.

Edited by zootal (see edit history)

Share this post


Link to post
Share on other sites

26900 is the game port that players will connect with. 26902 is the broadcast port that allows the server to be seen on the server list. Not sure offhand what 26901 is for, but I know Alloc wrote it down somewhere.

Share this post


Link to post
Share on other sites

Interesting. Without opening the second or third port, the server still appears on the server list. HOWEVER, I just heard back from one of my Internet players, and they can now join the empty server. So it looks like whatever those two ports do, without them Internet players can't join empty servers. And according to log, they used LiteNetLib, not SteamNetworking. I might try disabling SteamNetworking, but is there any reason to do so?

Share this post


Link to post
Share on other sites

PS TYVM about the port forwarding comment. I didn't realize the server needed more than just one port.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...