Borderlands 2 / Torchlight 2 through a VPN
by BenV 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.
Problem solved.
4 Comments for this entry
1 Trackback or Pingback for this entry
-
Co-op Borderlands with Teamviewer VPN « Something Different
April 29th, 2015 on 20:13[…] didn’t figure this out on my own – all credit goes to this guy and his blog post on it: http://notes.benv.junerules.com/borderlands-2-on-a-tunneled-vpn/The main gist here is that Borderlands broadcasts UDP packets, and by default your main Windows LAN […]
September 26th, 2012 on 07:21
Last night I tried doing the VPN thingy and METRICS with my roommates, however one of them (with win XP and VPN) still didn’t see the games. Also I didn’t see anywhere where I can set the METRIC on the VPN interface. But by default WinXP sets it to 50. Making the primary 1000 or even 9999 – still no games were to be found.
We connected directly via cables and a switch but,
guy with the other Win7 didn’t see the games until we disabled the IPv6 in the properties in his interface. Then everything started working again.
September 26th, 2012 on 10:24
X-spirit: thanks for your comment. Were you guys using OpenVPN or another VPN solution?
It’s interesting that disabling IPv6 helped, most games don’t do anything with v6 yet.
For me windows 7 with IPv6 enabled worked just fine (in combination with a vpn and without), didn’t see any v6 traffic when sniffing with tcpdump and wireshark. Maybe your windows was trying to be smart and route it through their pseudo ipv6 interface or something, hard to tell without running wireshark 🙂
Not sure on Windows XP and the metrics, I haven’t touched XP in a while, but good to know about the default metric of 50.
September 26th, 2012 on 16:39
What we were using was pptpd trough a linux box:
P1(XP) — Inet/pptpd — Linux server —LAN— P2(Win7) —LAN— WiFi — P3(Win7)
Also I (P2) am with Win7 and IPv6 enabled, but my roommate (P3) started seeing the games just after disabling IPv6 in his Win7 notebook. He also has some corporate firewalls and software and the installation is not a clean install, so maybe there is something added in the distribution.
At some point P1 didn’t see P2 and P3, then P1 saw P2, but P3 didn’t and so on and so on, until the direct LAN cable trough the apartment 😀
We also tried Tunngle.. but P1 couldn’t run it in XP for some strange reason…
Hamachi also didn’t do the job for all of us.
I doubt that they will want to install OpenVPN on their PCs and loose an hour in configurations when we can play this way.
November 24th, 2012 on 21:54
Hy!! I’m Massimiliano from Italy, sorry from now for my english, but i must make you a lot of compliments for this solution!!
I’m a linux fan and i love to play to a lot of games with my pc (and with my friends too..) and so the natural solution is the vpn.
The biggest problem that i’ve found is that “Windows is fucking retarded” 🙂 and so until now i haven’t found a solution for the udp broadcasting between the local and the vpn interfaces..
I’ve tried several solution like “forcebindip” or like change the network card priority in the windows’s network configuration, but the results was never a success..
I’ve test your first solution in the past with games that permits to choose an ip address (my favourite was operation flashpoint dragon rising): in this case i was be able to play with openvpn as vpn server, but in many other games this configuration fault.
In my opinion (unitl your solution..), my best option was playing with a pptp server because of the bradcast option that it has in the linux server configuration.
Those are my two cents for this argument, do you have make any other “experiments” more or less similar to this one..??