Use Windows VM for Wi-Fi similar to Wi-Fi Box?

Would it be possible to route a Wi-Fi connection from Windows VM back into the host FreeBSD system similar to how net/wifibox does with Linux? Here is my scenario:
At work we have several programs and utilities required that only run on Windows. These work well enough in a Windows VM using bhyve. The nature of my work requires me to frequently take my laptop to various locations, so Wi-Fi connectivity is vital. Our corporate Wi-Fi network blocks 802.11g and lower from connecting, and all our computers come with Intel Wi-Fi card (which still only operates in g mode on FreeBSD).

I have used PCI passthrough for the Wi-Fi card to the Windows VM and it connects without issue. Is it possible, and how would I manually configure it to bridge that connection back to the host FreeBSD?
 
You wouldn't use a bridge. You would do NAT on the Windows install, along with static addresses on the interface ends of the VM connection.

It should be pretty straightforward. But with Windows you never know.
 
First, install the Red Hat virtio-net driver in Windows, if you didn't already do.
You use a virtio-net interface linked to a tap with bhyve (-s 5,virtio-net,tap0 as part of the bhyve command line for example or use your vm manager for that). Note that you may have to create the tap with ifconfig under FreeBSD.
Bridge the wifi and the virtio-net interfaces under Windows: https://dev.mos.cms.futurecdn.net/qNuyGpe63Ucj9FiAudcPYX.jpg

You have to set up the network on the FreeBSD side (static ip, default gateway, dns).

Not tested, but this is what I would do.

As a slight variation, you can use e1000 instead of virtio-net (-s 5,e1000,tap0) so you don't have to install the Windows virtio-net driver, but I ain't sure about its performances.
 
You wouldn't use a bridge. You would do NAT on the Windows install, along with static addresses on the interface ends of the VM connection.

It should be pretty straightforward. But with Windows you never know.
Making some progress with this. Looks like the connection sharing is the way to do it, though it isn't as straightforward to do as it was when I last tried it in the XP days. Getting stuck on figuring out how to make sure the network is passing through and what addressing scheme to use. Some more research on the Windows side is necessary.

First, install the Red Hat virtio-net driver in Windows, if you didn't already do.
You use a virtio-net interface linked to a tap with bhyve (-s 5,virtio-net,tap0 as part of the bhyve command line for example or use your vm manager for that). Note that you may have to create the tap with ifconfig under FreeBSD.
Bridge the wifi and the virtio-net interfaces under Windows: https://dev.mos.cms.futurecdn.net/qNuyGpe63Ucj9FiAudcPYX.jpg

You have to set up the network on the FreeBSD side (static ip, default gateway, dns).

Not tested, but this is what I would do.

As a slight variation, you can use e1000 instead of virtio-net (-s 5,e1000,tap0) so you don't have to install the Windows virtio-net driver, but I ain't sure about its performances.
A bridge kills the network connection on the Windows VM. Looking around, it looks like you have to set manual IP addressing on Windows for it to continue having Internet after bridging. This won't work in my scenario, as I'll be constantly hopping AP's and sometimes needing to connect to different networks altogether.

Thanks for the replies. This gives me some direction to go.
 
Back
Top