Hello openvpncommunity,
On a linux server which is an openvpn
client i have an virtualised windows machine using qemu.
The openvpn setup uses tap interfaces, because the windows virtual machine should host game servers, which need broadcast feartues.
Now the problem is that I'm unsure how to bridge the tap0 interface on the server to the vm.
With the actual internet network interface I have already been sucessfull by creating a bridge br_inet, flushing the ip address of the eno1 interface and "dhclient br_inet". The windows machine shows that it gets another address in my home network 192.168.1.181. I would asume that the bridge setup for openvpn should be simmilar but I'm nut sure.
When creating a bridge for openvpn br_ovpn before starting openvpn, the ip of the client gets asigned to the tap0 interface not the bridge. I guess that it needs to get asigned to the bridge though, because I could only get my internet passthrough to work that way.
Setting up openvpn in the vm and using the internet passthrough is not an option, because the future plan was to leave the virtual machine disconnected from the internet and only use the openvpn interface.
The qemu command (just relevant part with network setup) at the moment is:
qemu -net nic,macaddr=50:52:51:52:51:52 \
-net brige,br_inet
Can I make the virtual machine have the same ip as the linux host, so that the network for the virtual machine looks like it is the client 192.168.1.7 and directly connected via lan to the openvpn server?
Another problem I encountered was that when setting up muptiple bridges for openvpn the interfaces belonging to each bridge to mixed up when starting the vm. The only info I found was
https://wiki.archlinux.org/index.php/QEMU#Tap_networking_with_QEMU, which stated that "With multiple taps, the most basic usage requires specifying the VLAN for all additional NICs: ". But I do not get why this should be requiered?
Current network setup (ip addr)
1: lo
2: eno1:
... (mac address physical network card, no ip)
3: br_inet:
...(mac address physical network card)...
inet 192.168.1.206/24 brd 192.168.1.255
4: tap0: (openvpn interface)
...(different mac)...
inet 172.16.17.7/24 brd 172.16.17.255
5: tap1: (created by the vm when starting up as the network interface for internet connection)
...(unique mac, no ip)
Any help is welcome 🙂
Thanks in advance
Benjamin