BenV's notes

Archive for September, 2012

Borderlands 2 / Torchlight 2 through a VPN

by on Sep.18, 2012, under Software

So today Borderlands 2 was released on steam for the USA.
Since “FUCK YOU ASSHOLES” — I’m not going to wait another 3 days for it to unlock over here, I’ll leech the torrent instead.
(at least for now). The Skidrow torrent works great btw 😉

Anyway, since my brother is on his own home LAN we have a nice and simple OpenVPN setup.
The OpenVPN setup uses tun mode, aka routing mode. This means that all VPN users get a local IP address from the OpenVPN server
in the 10.X.x.x range and not from DHCP. All great. After I made sure I could be connected to on the OpenVPN IP, we started Borderlands 2.

Locally the 2 PCs could find eachother just fine after killing the windows firewall. However, the connection through over the OpenVPN IP addresses
failed miserably. No time to find out why, but the trick from Borderlands 1 still works: start the game with your friend’s server IP behind it like this:

"C:\Games\Borderlands 2\Binaries\Win32\Borderlands2.exe" 10.11.12.13

Have fun playing! 🙂

Update:
After playing for a while I decided to go figure out what the problem was.
It was already annoying enough, but also Torchlight II had exactly the same issue: LAN games could not see each other through the VPN.

After running tcpdump / Wireshark for a while both locally and on the tunnel I noticed:
* These games use UDP broadcasts to detect if there are games running on the LAN
* Windows is fucking retarded
* The broadcasts only get broadcasted on a single Ethernet interface. Guess which interface DOES NOT get these broadcasts? Exactly, your VPN.

Fortunately I also have a solution:
The INTERFACE metric (note: this has nothing to do with ROUTING metrics!) determines which interface windows uses for these broadcasts. Normally this metric would be on “automatic metric“, and this probably means that your real Ethernet adapter gets the broadcasts.

To change this, open your LAN adapter’s properties (these days in windows 7 found in the Network and Sharing center, change adapter settings, right click your LAN adapter, properties), open the properties of the “Internet Protocol Version 4 TCP (TCP/IPv4)“, go to Advanced, make sure the box at the bottom that says “Automatic metric” is DISABLED.
Now you’ll have to enter a number there.
The big trick: Make sure you enter a number here that’s HIGHER than the number you’re going to enter on your VPN TAP Adapter (for example: 10).
Next do the same thing for your VPN adapter, but enter a LOWER number. For example: 1.

Windows 7 Interface Metric

Changing your LAN adapter’s Interface Metric in Windows 7

Problem solved.

5 Comments more...

Archives

  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)