Torchlight II

Torchlight II

View Stats:
Jem Nov 29, 2020 @ 6:12pm
Firewall Problems Detected - FIX!
TL;DR
Edit the file "Documents\my games\runic games\torchlight 2\local_settings.txt" and change the line "UDPORT :0" to "UDPORT :4549", then either make sure UPNP is enabled on your router or forward that port to the machine playing torchlight.

Edit: Each person needs to do this, not just the person hosting. Make sure to pick different ports if multiple people on your LAN are playing as you can only forward a port to 1 IP.

-- Backstory/Additional Network Info --
We used to play Torchlight II a lot. So a new friend got the game, and we set up a server and were going to play with him.

Something changed on the back end with the network code. We had a lot of connection issues, and all three of us tried to host (forwarding the classic ports as we had done in the past (TCP: 4549 UDP: 4175, 4179, 4171).

We kept getting a "Firewall Problems Detected" and none of us could connect. I was running OPNsense, a friend was running PFsense, and the third was on a commercial firewall (that doesn't support UPNP).

We broke out wireshark and found was that Torchlight II traffic was all going over Ephemeral ports. After me and my friend installed the UPNP plugin on (OPNsense/PFsense), one client could connect at a time, however when the third one tried to connect it would stop at "connecting to peers".

This wouldn't work as only two of us had a firewall that would do UPNP, and even then we needed more than 2 people in game. We stumbled across this article which had the solution: https://support.arcgames.com/hc/en-us/articles/360017720073-Strict-NAT-Detected

It turns out that Torchlight II now uses ephemeral ports (I'm assuming in the 49152 to 65535 range as all ours were in the 50k-60k range) that it opens with UPNP.

You can override this behavior by editing the following file:
"Documents\my games\runic games\torchlight 2\local_settings.txt"

Change the line "UDPORT :0" to "UDPORT :<udp port>". We used 4549 for nostalgia so it looked like "UDPORT :4549". If you have UPNP enabled it will automatically forward that port, and if you don't then you will need to manually forward that port.

You could use any port, I'd recommend something in the 1000-5000 range. But the number in the local_settings.txt file must be the same as the port you forward.

P.S. Many firewalls block incoming requests in the IANA ephemeral ports range, as those are intended to be used with established connections.

P.P.S. Posting because we dug around on the internet a lot and either no one had posted the solution or we just managed to miss it. Hoping to save someone from spending 4 hours troubleshooting their network stack with friends over teamspeak.
Last edited by Jem; Nov 29, 2020 @ 11:10pm
< >
Showing 1-12 of 12 comments
TOG | Phanjam Nov 29, 2020 @ 7:57pm 
This is really helpful @Jem, thanks so much for posting!
Jem Nov 29, 2020 @ 11:39pm 
You are welcome. I'm glad it was helpful to someone. All three of us are now playing. Instantly connecting now with no warnings or issues.

This issue probably won't effect everybody, but if just one client in the group has a router that doesn't support UPNP (one of us), or is running a somewhat hardened firewall (all three of us), then it can cause connection issues for everyone. Luckily manually specifying and forwarding a port in the appropriate range clears it up.
Last edited by Jem; Nov 29, 2020 @ 11:40pm
potterman28wxcv Nov 30, 2020 @ 2:28am 
Awesome! For more visibility (because that post will be buried after a while), you could publish a Guide on it :) No need to be fancy, you can just copy paste that text

https://steamcommunity.com/app/200710/guides/
★REM★ Nov 30, 2020 @ 9:18am 
I'm still getting firewall error, i forwarded the port on both my router and firewall.
Jem Nov 30, 2020 @ 5:42pm 
REM, Can you verify that you and every person connecting to your game has followed those steps? One of the problems is that the game connects to peers, so if there is an issue connecting to anyone else in the game it will cause trouble. With me and my friends, it didn't work until all three of us configured and forwarded a port.
TAW|REA Dec 20, 2020 @ 11:39am 
Originally posted by Jem:
TL;DR
Edit the file "Documents\my games\runic games\torchlight 2\local_settings.txt" and change the line "UDPORT :0" to "UDPORT :4549", then either make sure UPNP is enabled on your router or forward that port to the machine playing torchlight.

Edit: Each person needs to do this, not just the person hosting. Make sure to pick different ports if multiple people on your LAN are playing as you can only forward a port to 1 IP.

That seems to fix the issue. Thanks! Yet I still do not understand the reason; couple years ago, a friend of mine was able to join my Steam - Linux version with GOG - Windows version without any port editing whatsoever. As I checked SteamDB, Windows and Mac repos of the game was updated in 2017 and Linux repo was updated in 2015 for the last time; it's clearly not a client side of thing. Something must be changed on masterserver side...
DSShadow Dec 26, 2020 @ 5:27am 
I think what is changed these Days is: Internetproviders start to switch the IP Protocols from ipv4 to ipv6 (Or DS-Lite). Thats why these old games didnt work anymore in short... It affects a bunch of old games for me like TitanQuest... and with that, no portforwading can work
steffire3 Dec 26, 2020 @ 10:33am 
Originally posted by DSShadow:
I think what is changed these Days is: Internetproviders start to switch the IP Protocols from ipv4 to ipv6 (Or DS-Lite). Thats why these old games didnt work anymore in short... It affects a bunch of old games for me like TitanQuest... and with that, no portforwading can work

We have reports of specific ports working from some TL2 Players however it seems the number of viable ports has gone down considerably. Will be interesting to see if this trend continues.
LanCeHoR Jul 16, 2023 @ 10:50am 
cant play wtf.
𓅃 スノ 𓅃 Jul 16, 2023 @ 11:26am 
create a guide so we can save it.
HiFive Jul 16, 2023 @ 3:27pm 
Originally posted by 𓅃 スノ 𓅃:
create a guide so we can save it.
We have this guide. I didn't check to see if it has the same information.
https://steamcommunity.com/sharedfiles/filedetails/?id=2409577724&searchtext=firewall
Sir Willard Dec 31, 2024 @ 6:57pm 
THIS WORKED. My friend did this, only him. I didnt have to change anything. THANK YOU
< >
Showing 1-12 of 12 comments
Per page: 1530 50