Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running an OpenVPN server in bridged mode and clients can successfully connect, see shared folder and play LAN games that let you enter the LAN IP address. However I'm unable to play games like Sacred Underworld I believe because it sends out broadcast packets. The game doesn't even show up in the list of games on the client machine.

I'm new to OpenVPN but I think this may be related to either of the following two issues:

  1. I may need a route of some sort to allow the broadcast packets to be handled correctly (though am unsure how to set this up)

  2. My VPN runs on a different subnet than my router. I.e. my home network is 192.168.1.xx and my VPN uses something like 10.0.0.xx. Is it possible that I need to get my VPN to share the same subnet as my actual network (i.e. 192.168.1.xx)? If so how can I set this up?

share|improve this question
    
Are you able to select which network interface is used in the game? It sounds like the game is defaulting to the wired interface, and instead you need it to use the VPN interface. –  Zoredache Sep 14 '11 at 0:58

2 Answers 2

Regarding question 1:

LAN games using (UDP) broadcasts typically choose the network interface which uses the lowest metric for its broadcast route (i.e. ip 255.255.255.255). Most probably your default network interface (e.g. your NIC) has the lowest metric so the games broadcast e.g. on your 192.168.1.0/24 LAN instead of the VPN. You can check your route table with route -vn on Linux or route print on Windows.

To get broadcasts on your VPN, do the following on all OpenVPN clients (not on the server):

Add a new broadcast route (255.255.255.255/32) on your OpenVPN interface with a lower metric than the one your default network interface uses. If such a route already exists on your OpenVPN interface then just change the metric to be the lowest one.

In Windows the broadcast route already exists so you can just change the global interface metric like this:

netsh int ip set int <name_of_your_openvpn_connection> metric=5

This will prioritize the OpenVPN interface if a connection is established.

In Linux you probably just need to add the corresponding route (add a metric if necessary):

route add -host 255.255.255.255/32 <your_openvpn_device>

This will get games like WarCraft III or Anno 1404 to broadcast to the VPN instead of to the local LAN (successfully tested with a Debian OpenVPN server and several Windows 7 clients).


Regarding question 2:

There are plenty of tutorials (also helper scripts) available on how to setup ethernet bridging in OpenVPN.

Note that you don't need any ethernet bridging at all if you just want to be able to play LAN games over OpenVPN. It is enough to use OpenVPN with tap devices, e.g. to also handle broadcasts or protocols like IPX which are needed for old games.

share|improve this answer
    
Awesome! The first part of your answer solved all our problems. Although I did not understand what exactly I was doing. route print gave me a metric of 286 while your command changed it to 261. How does this concur with metric=5 ? –  AmShaegar Jul 11 at 0:57
1  
The metric is used to prioritze routes when similar route exist. I don't know exactly why Windows doesn't take the given value for the metric, but I noticed that using a low metric like metric=5 creates a route that has the lowest metric if other similar routes exist. Therefore the new route will be prioritized for UPD broadcasts. –  speakr Jul 11 at 9:53

There are two metrics, the interface metric and the gateway metric. For IPv4, the real metric is the sum of both.

One or both may be configured as automatic. If you want an exact value, you must especify both.

You can do it with the mouse, configuring the advanced properties of the interface IPv4 protocol.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.