Score:-2

Bridging with OpenVPN on a VPS without an actual LAN on the server side for LAN Gaming

gg flag

I am trying to set up an OpenVPN-Server on a VPS that allows LAN Broadcasts between the connected clients.

Now I read that you need bridging for that. But in my case the VPS has no LAN. It is just the server with an ethernet interface with access to the internet.

But is it possible to set up a bridge on the VPS so that clients can connect to it resulting in all clients being connected to each other as if they were on the same physical LAN? Do I even need bridging for that or can that be done without bridging by only using TAP with a specific configuration? It is pretty much a duplicate of several dead-end questions, especially this one: OpenVPN TAP without bridging

I'll appreciate any help here, thanks!

EDIT: Here is what I have so far:

Server-Config:

remote-cert-tls client

port 1194
proto udp4
dev tap

server 10.200.0.0 255.255.255.0

persist-key
persist-tun

keepalive 10 120

dh /etc/openvpn/dh.pem
ca /etc/openvpn/ca.crt
cert /etc/openvpn/openvpn_server.crt
key /etc/openvpn/openvpn_server.key

user nobody
group nogroup

cipher AES-256-GCM
auth SHA256
tls-crypt /etc/openvpn/ta.key

push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

verb 3
daemon

log /var/log/openvpn.log
status /var/log/openvpn/openvpn-status.log
ifconfig-pool-persist /var/log/openvpn/ipp.txt

Client-Config:

client

dev tap

proto udp4

remote MyServersRemoteAddress 1194

resolv-retry infinite

nobind

persist-key
persist-tun

ca ca.crt
cert client_1.crt
key client_1.key

remote-cert-tls server

tls-crypt ta.key

cipher AES-256-GCM
auth SHA256

verb 3

Pinging the OpenVPN server works fine. Pinging other clients on the VPN also works fine. But LAN Games still don't work.

EDIT 2: It now works for most of the games (i.e. Warcraft III, not working for Far Cry 2 for some reason, I think far cry 2 is just broken). I changed the metric of the VPN routes (run in cmd):

netsh int ip set int <name_of_your_openvpn_connection> metric=5

And I changed the type of the network (run in powershell):

Set-NetConnectionProfile -InterfaceAlias 'OpenVPN TAP-Windows6' -NetworkCategory 'Public'
djdomi avatar
za flag
plant offtopic for serverfault.com –
Score:1
cn flag

You can add client-to-client option in server configuration, then clients can communicate each other. OpenVPN reference

gg flag
That does not seem to get broadcasts to work. I do am able to ping from Client_1 to Client_2. But the broadcast from Client_1 never reached Client_2.
cn flag
Layer 3 broadcast (ie 192.168.0.255/24) may work if clients are on same subnet.
gg flag
Yes but here I am trying to achieve a layer 2 LAN connection between the clients. It basically ends up with me wanting to play old LAN Games. As far as I understood I absolutely need layer 2 broadcast for that to work.
gg flag
It works now, it was just the game (far cry 2) that I was testing with which is not working properly. Warcraft III works like a charm with the above setup
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.