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'