Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to setup a gaming VPN. Ie. I have some games that work over LAN and would like to play them with people that are not on my LAN. I know I can do this with OpenVPN.

My ultimate goal would be to run OpenVPN portably on my host OS and not even need any virtualization. As such I don't want to install it on my host, but I'm fine with running it portably. I'm even fine with temporarily adding registry keys, and then running a .reg file to remove these entries once I'm done. To this effect I have installed OpenVPN on a virtual machine and diffed the registry. I then manually (using a .reg file) added all the keys that seem important on my host OS and copied the installation folder of OpenVPN onto my host machine. Then I tried to run openVPN GUI 1.0.3 as a test and it says "Error opening registy for reading (HKLM\SOFTWARE\OpenVPN). OpenVPN is probably not installed". I verified that that key is indeed in the registry with all subkeys and it looks correct. I have tried running the GUI as an administrator and in compatibility mode with no success. I am running Windows 7.

If this fails then i would be happy with installing OpenVPN on a virtual machine in VMWare but they key is that i will be running the game installed on my host machine. The first question for this option is if this is even possible. The second is, that I can't get the VM to have internet access if I use bridging but i can if i use NAT. Is it possible to do this game VPN setup with VMWare guest OS running using NAT?

Summary of questions: -Is it possible to run openVPN portably and if so what did i miss above? -If it's not possible to run it portably, then can setup a gaming LAN by installing OpenVPN in a guest OS with NAT and how can i do this? -If the above is not possible then can i install OpenVPN in a guest using bridging and if so how can i set this up with a Windows 7 host and Windows XP guest as currently i can't get the guest to be able to access the internet in bridging mode, but it working in NAT mode. -In general is there any good documentation on setting up a gaming LAN with OpenVPN (i am using 2.1.4) as i have never set up a VPN of any sort before so any help would be much appreciated.

share|improve this question

migrated from Mar 7 '11 at 12:27

This question came from our site for professional and enthusiast programmers.

This can be done, absolutely.

Install OpenVPN on your computer, firstly. The overhead for running the VPN in a VM will be a lot greater than just hosting it, plus there will be routing issues that can be tricky for the non-networking savvy type.

I fully agree with the disuse of any software that requires a third-party, which is exactly why I run my own SSH, VPN, and VNC servers. I am in control of all aspects of my network.

So, let's begin with laying this out. I have never done this before, but I am sure we can put our heads together to figure it out.

It is simple with just one client with all traffic being forwarded through the VPN tunnel.

Client <====> You

Now we want to have anyone be able to connect. And you can reuse the same exact settings since "who" is connecting is not the main concern here; you just want them to connect and you don't want to go making 36 inidividual client keys and certificates for all 36 clients either. So, reusing the same client.ovpn config file, client certificate and client key will do.

This is our goal.

Client <==. 
Client <===. 
Client <====> You
Client <===` 
Client <==` 

This should be quite simple to do.

Client.ovpn config file

dev tun
proto udp
remote 1194
resolv-retry infinite
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
verb 3

Server.ovpn config file

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
ifconfig-pool-persist ipp.txt
keepalive 10 120
status openvpn-status.log
verb 3

The client config will connect to the server. The server with a subnet mask of /24 will have a pool of 253 IP addresses to hand out, but you won't be using all of them. The highest I've seen a multiplayer game have is 125 players (Battlefield 2 mod). You shouldn't need to push all traffic though the VPN. Since everyone is connected to the same server you can host the game on the server and everyone should be able to see it. All the clients will not be able to "see" each other, but they will all be able to see you.

share|improve this answer
I believe there is only one thing missing from this is the fact that you will need to "bind" the game to your TAP device. Normally the game will "look" for games on the Local Area Network device. I remember such a program that allows you to do this. – naisanza Apr 7 '11 at 13:22
link: – naisanza Apr 7 '11 at 13:23
Oh and be sure to add proper ports that the game requires to the firewall on you computer. – naisanza Apr 7 '11 at 13:25
And be sure to port forward port 1194 from your router to your computer as well. – naisanza Apr 7 '11 at 13:27
use to sign up for an account. register a domain name and use that in place of "" in the client.ovpn config file. and set your router to update its IP to as well. – naisanza Apr 7 '11 at 13:28

If you want to play with your friends online via LAN I would recommend Hamachi. It Creates a "LAN" for all Friends who are connected. It's absolutely free, requires no registration and works fine for most games.

share|improve this answer
yeah sorry i should have mentioned this, but i don't want to go through a third party. I want control of the VPN that's why i want to set up my own, plus it's a learning exercise. But good suggestion. thanks. – Coder Mar 7 '11 at 12:16

I changed my router firmware to dd-wrt. It has a built in VPN service ( option for openVPN) then pass out usernames and passwords to friend. Host local game and they usually have no problem joining.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .