[1.1.94] NAT punching only attempted from browse menu

Post Reply
Gweneph
Inserter
Inserter
Posts: 30
Joined: Thu Nov 14, 2019 11:51 pm
Contact:

[1.1.94] NAT punching only attempted from browse menu

Post by Gweneph »

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.
wireshark capture
wireshark capture
Image 402.png (47.32 KiB) Viewed 760 times
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.
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.

Gweneph
Inserter
Inserter
Posts: 30
Joined: Thu Nov 14, 2019 11:51 pm
Contact:

Re: [1.1.91] NAT punching only attempted from browse menu

Post by Gweneph »

I just got around to testing this out on a 1.1.94 Linux build with the same results:
Screenshot from 2023-11-07 20-42-19.png
Screenshot from 2023-11-07 20-42-19.png (300.8 KiB) Viewed 646 times
Again, no NAT punch requests sent until I opened up the match server GUI and selected the game from there.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13240
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.94] NAT punching only attempted from browse menu

Post by Rseding91 »

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.

Post Reply

Return to “Fixed for 2.0”