When attempting to re-join a server, NAT Punching is not attempted.
After taking a nice lunch break from a multiplayer game that's hosted behind an NAT, you'll find that it won't connect when you try to re-join.
However, if you browse to the same game and join from the browse public menu, it joins up with no issues.
The reason, is that when re-joining, no NAT punching is requested from the pingpong servers.
Here's a Wireshark capture of me attempting to re-join (last attempt highlighted) followed by me successfully joining from the browse menu.
The Factorio log for this same session is also attached.
From my testing, it appears that this lack of hole punching also applies to connect to address, whether it's through the game menu, or through the command line. This means that if you synchronize mods with a server behind a NAT, then it won't be able to connect after restarting, you'll have to go through the browse menu again.
I think it would make sense to always attempt NAT punching (maybe after a short timeout?) rather than only doing it when games are joined through the public browse function. Alternatively, you could add a NAT punch command-line switch and a NAT punch flag in player-data->last-played->server to allow for joining after mod syncs and re-joining respectively.
[1.1.94] NAT punching only attempted from browse menu
[1.1.94] NAT punching only attempted from browse menu
- Attachments
-
- factorio-current.log
- (10.48 KiB) Downloaded 33 times
Last edited by Gweneph on Wed Nov 08, 2023 1:55 am, edited 1 time in total.
Re: [1.1.91] NAT punching only attempted from browse menu
I just got around to testing this out on a 1.1.94 Linux build with the same results:
Again, no NAT punch requests sent until I opened up the match server GUI and selected the game from there.Re: [1.1.94] NAT punching only attempted from browse menu
Thanks for the report. This is now fixed for 2.0.
If you want to get ahold of me I'm almost always on Discord.