I've recently been trying to set up a headless Factorio server on my Ubuntu 18.04 VDS.
I've followed the guide given on their Wiki, went through the usual pain of figuring out what I set up wrong, and eventually got it running.
The problem:
- The server appears in the server browser. However, I cannot connect to it, and neither can my friend (who is on a completely different network in another country).
- Where the server browser displays ping, the value for ping is "can't reach". When trying to join anyway, I will receive the message "couldn't establish network connection to server." OR less often I will be able to join (although this is not true of my server; I've never been able to successfully connect.)
- I thought this may be an issue on my end, but I looked at other servers in the server browser, and this error only occurs with some servers.
- I can connect to servers for which I can determine a ping. I joined one of the servers so I could determine which port it ran on, just in case that was different than my server, but the port is the same for my server (default 34197 UDP).
- Some servers that I have the "can't reach" error for do have players on them, so other players are able to connect.
- I enabled verbose logging for the server to see if I received any errors, or specifically any errors that occur when players try to connect. No errors of any type are present in the logs.
[Client-server connections] https://www.factorio.com/blog/post/fff-99
[Lock step architecture] https://www.factorio.com/blog/post/fff-76
[UDP NAT punching] https://www.factorio.com/blog/post/fff-143
[Factorio Multiplayer Wiki Page] https://wiki.factorio.com/Multiplayer