Bridging wifi to kvm.

I’m switching from vmware to kvm …or trying to. Is there a way to bridge a br0 interface or something to the wifi adapter interface? In vmware or virtualbox you can bridge to the wifi adapter easy so guest are dropped on the local LAN to get their dhcp address and communicate with the other LAN computers without any nat. I can’t find out a way to do this on tumbleweed and or kvm with virt manager. Is it possible to bridge to a wifi adapter as I’m seeing it might not be possible but …how does virtual box do it on linux?

See here:
https://doc.opensuse.org/documentation/leap/archive/42.1/virtualization/html/book.virt/cha.libvirt.networks.html#libvirt.networks.bridged

I just tested on VB and it does MAC NAT (if you look at frames on destination system they arrive with MAC of WiFi adapter, not VM).

I can’t find out a way to do this on tumbleweed and or kvm with virt manager.

On the low level you can use ebtables to implement MAC NAT. See e.g. https://ebtables.netfilter.org/examples/basic.html#ex_nat. Whether libvirt offers high level configuration to do it I do not know (I do not use it and quick search does not show anything). If there is possibility to run custom hooks when VM is started it should be relatively straightforward to implement … apparently it supports hooks: https://libvirt.org/hooks.html.

That the doc I was working with; I can make the bridge with the brctl commands but not add the wifi interface…no errors. I’ve tried the same with the newer supported way of using the ip commands as in this article.

https://wiki.archlinux.org/index.php/Network_bridge

The bridge can be created but when I try to add the wifi interface to the bridge it says it can’t enslave that interface. I thought virt-manager had a proxyarp feature, one article on debian shows using something called parprouted but there’s no such opensuse daemon. I have hard time believing vmware and VB can do this so easily!


Well, features do not grow on trees, someone must (feel the need to) implement them. Ever heard about scratching own itch?

I thought virt-manager had a proxyarp feature

According to https://libvirt.org/firewall.html, this is planned for future. Actually, parprouted is needed only for dynamic addresses. If you can use static IP addresses for your VM, you could simply add necessary configuration in QEMU script.

one article on debian shows using something called parprouted but there’s no such opensuse daemon

You could contribute by packaging it for openSUSE. It is not really that hard. Of course, Debian is using different network configuration framework, so this article will also need to be adapted to whatever openSUSE is using.

Or may be you need to consider whether you really need bridge in the first place.

I have zero desire to be involved at the level of packaging software. I’m just a end user…desktop mostly but have a few vm/s I use for various things. I was shocked because it’s been my experience in opensource that they generally find a way to do something first …then the vendor steals it. I’ll most likely just pull a ethernet cable from the room the router/firewall is in…or perhaps it’s time to build me a decent kvm/proxmox bare metal server to host the vm/s on…something like a intel nuc. Thank again!

Hi
In the past I’ve used a small wireless router, (GL.iNET GL-MT300N) very flexible and configurable and can run off the USB port for power…