News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 45
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 50
Total: 50

Author Topic: Fixing the Strict NAT Issue In Multiplayer  (Read 6521 times)

0 Members and 14 Guests are viewing this topic.

Fixing the Strict NAT Issue In Multiplayer
« on: »
So, here's how I fixed my strict NAT issue and some background info provided by Chthon.


Network Address Translation (NAT) is a method that enables Peer to Peer (P2P) connections like the one used for TL2.  Your router has different NAT settings and these can affect your ability to play P2P games.  Your NAT can be Strict, Medium, or Open.  An unlimited number of people with Medium and Open NATs can play together.  But, the problem comes with someone with a Strict NAT.  If you have a Strict NAT you can only play with other players who have Open NATs.  If anyone else has Strict or Medium NAT settings, you will suffer the well-known disconnects common to TL2's multiplayer.

So, here's how I fixed my NAT.

1) Enable Port Forwarding on your Router.

To do this:
-open the Command Line (CMD).
-type 'IPConfig', hit ENTER
-find the IPv4 address and the Default Gateway.  Both of these are IP addresses.  Here's an example of what that looks like (198.162.1.1)
-keep the CMD window open, you'll need to reference these IP addresses

-open your internet browser
-input the Default Gateway address into your html bar and hit ENTER, this should take you to your router login.  If it doesn't, try routerlogin.net
-enter your ID and password.  Usually it's 'admin/password' by default.
-find the Port Forwarding settings for your router
-set Port Forwarding to enabled and enable forwarding to the following TCP and UDP ports:


2) Edit your local_settings.txt file

Runic suggests this might help your NAT and this is what worked for me.
https://support.runicgames.com/kb/articles/3-strict-nat-detected

-go to your Torchlight 2 folder, usually USER/DOCUMENTS/MY GAMES/RUNIC GAMES/TORCHLIGHT 2/
-open local_settings.txt
-change the line UDPORT :0 to a port number within the ranged we opened for Port Forwarding on our router. 

I don't know for sure, but I suspect it's best not to set it to the same port that TL2 already requires.  You can see which ports those are here:
https://support.runicgames.com/kb/articles/27-network-port-requirements

If someone knows more about this problem, please feel free to pitch in.  If this works for you, let me know here.  If it doesn't, let me know, too.
« Last Edit: May 03, 2016, 03:21:50 pm by Phanjam »

Share on Bluesky Share on Facebook


Re: Fixing the Strict NAT Issue In Multiplayer
« Reply #1 on: »
Thx much for this Gyt! I'll be sure to try this out sometime before the weekend. Will let you know


Re: Fixing the Strict NAT Issue In Multiplayer
« Reply #2 on: »
As with opening ports, be careful to choose a "free" port number that's not in the well-known/system port range (most ports >1023 should be fine), and of course have your firewall configured correctly because it's a possible security risk.

NAT types technical info:

« Last Edit: April 18, 2016, 12:09:36 pm by Khazad »

Re: Fixing the Strict NAT Issue In Multiplayer
« Reply #3 on: »
A few things to add:

1. If it is implemented correctly in your router's firmware, turning on UPnP should be all you need to do. Port forwarding, as described in the first post, should not be necessary. Of course, the firmware on most consumer routers is utter ****, so their UPnP implementations may very well be incorrect. In which case, you would need to fall back to trying port forwarding.

2. Following up on Khazad's post, Wikipedia has a pretty good list of commonly used ports. Try to use a port that's not on the list.

3. It is unsafe to leave your router's admin password as the factory default. That is just asking to get your router hacked. You should change the password on a router immediately after buying it. If you fear being unable to remember the password, use a password manager,* or simply write it down and tape it to the side of the router, or both.

(*I would recommend PasswordSafe, originally written by famed cryptographer Bruce Schneier, and OPEN-SOURCE. Never use a closed-source password manager; they cannot be trusted.)

4. The ultimate remedy for shitty router firmware (for instance, with buggy UPnP implementations) is to reflash the router with open-source firmware -- either OpenWRT or DD-WRT. This will generally result in a functionality upgrade (both in terms of replacing buggy stuff with stuff that works right and in terms of adding features that just don't exist in the manufacturer's firmware) and also a security upgrade (consumer router firmware is notorious for major security flaws that are never patched). This can turn your $40 cheapo router into a super-router superior to anything available in the consumer market. Installing OpenWRT is very easy and takes maybe 15 minutes. Basic configuration is straightforward. (Example: setting a firewall rule to prevent any communication between the internet and your printer (which has no legitimate reason to talk to the internet.)) Configuring it for more fancy stuff like using encrypted DNS from OpenNIC is trickier. (But it's possible. And you'd never even dream of doing something like that on the manufacturer's firmware.)

(Note: If you're even thinking about reflashing a router with open-source firmware, you'd better get the router you plan to use soon. Thanks to some FCC dumbfuckery, it may become a lot harder to find compatible routers starting this June.)

Re: Fixing the Strict NAT Issue In Multiplayer
« Reply #4 on: »
1. If it is implemented correctly in your router's firmware, turning on UPnP should be all you need to do. Port forwarding, as described in the first post, should not be necessary. Of course, the firmware on most consumer routers is utter ****, so their UPnP implementations may very well be incorrect. In which case, you would need to fall back to trying port forwarding.

Good catch.  Just a side note: for UPnP to work in the way described, the application in question (TL2, in this case) needs to support it, which it does.

Quote
Turn on UPnP in your router, if it has the capability. UPnP support is often flaky in routers that are already strict NAT, but the game does try using UPnP if it's enabled.
(From: https://support.runicgames.com/kb/articles/3-strict-nat-detected)

Important caveat: Some routers apparently have UPnP externally visible, which is a HUGE security vulnerability (perhaps another good reason to use open-source firmware, as Chthon mentioned).  You can test this by going to this site (make sure upnp on your router enabled first):

GRC Internet Security Detection System
grc.com

Click "proceed", then click on the big yellow "GRC's Instant UPnP Exposure Test".

Edit: ShieldsUP can also do port and service scans, so you can get a good general idea of your "visibility" to others on the internet and possible holes in your configuration that you may want to plug.
« Last Edit: April 18, 2016, 07:11:59 pm by Khazad »

Re: Fixing the Strict NAT Issue In Multiplayer
« Reply #5 on: »
Just got a little paranoid so i went back over your tut @gytfunke and removed your references to actual port numbers  :-X


Re: Fixing the Strict NAT Issue In Multiplayer
« Reply #6 on: »
Nah, port numbers are fine to post. There's nothing private or sensitive about them.

Re: Fixing the Strict NAT Issue In Multiplayer
« Reply #7 on: »
Heyya Chthon! Okay this is good to know. Thanks!


 

Recent Topics+-