How to setup a VM with OpenVPN interface?

Dec 19, 2021
13
3
8
Germany
I want to setup a VM with all Traffic going through a VPN Tunnel, without having to set anything up on the Guest.
So the final setup should be something like this:

LAN -> vmbr0 -> other VMs -> OpenVPN Tunnel -> vmbr1 -> VM

but I can't figure out how to setup OpenVPN to do this, as I always end up locking myself out... Has anyone ever had something like this?

Any help is appreciated, thanks
 
I created my VPN OPNsense connected to the 3 subnets: WAN, LAN and VPN.
Each subnet got its own bridge and my OPNsense is running the wireguard plugin. That OPNsense will only provide DNS/DHCP/gateway and so on on the VPN subnet. But I created some firewall rules that LAN and VPN are isolated but I whitelist specific ports/IPs to allow routing between the LAN and VPN subnet so for example guests in my VPN subnet can access my graylog and zabbix server in the LAN subnet and I also allowed SSH connection from LAN to the VPN subnet so I can access my guests there.
 
Last edited: