An awkward / unusual situation, Networking between VM and Host

I might be posting under the wrong category do let me know if I need to change it and where to.

I am a high school student,now that that is out of the way. I have been using Linux (Ubuntu, I think I will switch to openSUSE just to try something else) as my daily driver for about 2 years now on a Macbook Air 6,2 (irrelevant) and I had absolutely no problems at my school with using the wifi or the print servers. My school has been using the Ruckus Cloudpath On-Boarding Solution to manage BYOD connections to the network, they also use a Fortinet Firewall to manage Internet Censoring, Port Blocking, Bandwidth Throttling, etc(maybe Relevent). This is a boarding school by the way. The school has had no problems with me (and a the few other that do) using Linux up until now. I switched to a Dell XPS 13 9365 this summer after my Mac died, and the school went on a whole anti-linux campaign (exaggeration). But basically they denied me (and the other students) from using linux by basically cutting us off from the network, while at the same time the school heavily relies on Google Classroom, Google Drive, Skyward for Grades, and Outlook from Office365. Also this year they deny mobile devices from connecting to the network at the school level but letting them connect at dorm level (We are in the Himalayas). I was able to temporarily get around this by either buying mobile data and creating a hotspot on my iPhone or at dorm level I would borrow a friend’s android to USB Tether. Finding both solutions tedious and mobile data being expensive, I created a Windows VM using Qemu/KVM and Virt-Manager and passed through a USB WiFi adapter I had spare. I did not pass through the built-in one as I don’t know how to use IOMMU and I didn’t want to play around with it to learn it on a machine I use for everyday work. I had to disconnect the NAT from from the VM as windows as with other OS’es priorities ethernet over wifi connection. (also I was unable to setup a shared folder but thats a problem I’m far less worried about.) So here is the thing is their anyway to “share” the network connection from my VM to my host machine (currently Ubuntu 17.04) or is their another solution that will work better for me until I am able to argue it out with school (i do have support from 3 staff members). Yes, I realise this is a rather weird situation that I am in. All help appriciated and please let me know if anyone needs extra information.

Bagarius

Edit: changed the misleading title

You’re problem is that you can’t bridge WiFi connections. I personally don’t know why, but all the tools that I’ve used on Linux for managing networks on Virtual Machines haven’t allowed me to do that.

What you can do is this:

Create two virtual ethernet adapters. Give one to the VM and one to the host. Put them on their own network using a bridge. Go into Windows and:

  • Go to Network and Sharing Center.
  • Click Change Adapter Settings on the left navigation pane.
  • Right click your USB WiFi adapter.
  • Click Properties.
  • Click the Sharing tab.
  • Click the check box saying “Allow another machine on the network to use this connection” or whatever the wording is for that.

This should allow your Host’s virtual ethernet adapter to get a DHCP address from the Windows VM and use its internet connection.

So the network adapters should look like this:

Linux Host

  • Physical Ethernet (unused)
  • Physical WiFi (unused)
  • Virtual Ethernet (in a bridge with the VM Virtual Ethernet)

Windows VM

  • Physical passed-through USB WiFi (going to school LAN)
  • Virtual Ethernet (used to give access to the Windows’ internet connection to the LInux Host, in a bridge with the other virtual ethernet)
1 Like