0

Is there anyway to run, for example, Ubuntu within VirtualBox, and Windows 10 on the outside, but Windows 10 is not connected to the internet, while the virtual machine, is?

I am using a USB wireless LAN, with my current settings when i turn off wifi within Windows 10, naturally the internet stops working within Linux because it is considering it a wired connection.

My plan if it is feasible is to keep this Windows unit offline permanently and use the install of linux for any web based activity. A bit convoluted though that's the idea!

7
  • Possibly. I believe you could set up the Ubuntu VirtualBox VM to use NAT networking. Then on your Windows 10 machine (aka: host machine) you could turn off the internet connection. But you would have to still keep the network adapter active. Nov 27, 2022 at 4:16
  • I am using a USB wireless LAN, with my current settings when i turn off wifi within windows 10, naturally the internet stops working within Linux because it is considering it a wired connection. My plan if it is feasible is to keep this windows unit offline permanently and use the install of linux for any web based activity. A bit convoluted though that's the idea!
    – Riko
    Nov 27, 2022 at 4:26
  • Well, you might be better off dual booting you machine with Ubuntu and Windows 10. But I believe another idea is to make the USB Wi-Fi talk directly to VirtualBox when you start the Ubuntu VM up. I forgot how to do it, but I believe you have to go to the USB tab in the VirtualBox config and set the USB Wi-Fi adapter to be connected to VirtualBox that way. This guide is for hard drives but the general idea is the same. Good luck! Nov 27, 2022 at 4:33
  • 1
    Thanks! I am currently attempting just that and ill see where i go, cheers!
    – Riko
    Nov 27, 2022 at 4:35
  • 2
    "I am using a USB wireless LAN" – (1) This information should be in the question body. (2) There should be an option to assign the USB device to the VM on the USB level. Nov 27, 2022 at 6:36

3 Answers 3

1

With the USB dongle it is pretty easy. What you are looking for is a technique called "USB passthrough"

  1. First install the guest additions on your VM and power it off.

  2. Then in the VM settings go to the USB tab and add another USB device. Select your WiFi adapter.

  3. Boot the VM, the adapter should now be visible to Ubuntu.

VirtualBox USB documentation

0

You could create firewall rule(s) to stop your windows 10 from using the internet. answers could vary depending on what firewall(s) you have. this way you could be connected to the network but not to the internet, and you will still allow the VM to use the internet.

3
  • Are you sure this will work? With NAT networking the host is working as a NAT gateway for the guest. If host doesn't have internet access, neither does the guest. I'm not sure how bridged mode would work, but I'm skeptical.
    – gronostaj
    Nov 27, 2022 at 20:53
  • NAT will allow the VM to access the internet if the host machine is connected. that's why we will keep the host machine connected but block it from getting responses from websites. and as I said it depends on the firewall and the rules that you create.
    – Michel
    Nov 27, 2022 at 20:57
  • I did manage to make it work with using an old wireless N stick ( My newer Linksys for some reason would never show up as a device for some reason in ubuntu), used NAT and just selected the usb from a list, though again, only one of my wireless sticks worked, maybe not compatible. However i am now attempting to try and have a separate machine with an onboard NIC to connect to the internet, while the host machine (windows 10) is not connected. Same premise though onboard wireless, not usb. Not sure if that is possible.
    – Riko
    Nov 28, 2022 at 3:19
0

Solutions.

After a while tinkering around i found a solution for both.

Solution for USB: Get a compatible usb stick that works with the VM ( In my case, ubuntu ) set it to NAT and the select usb and boot in and you will have internet in guest but no host pc.

Solution for onboard NIC (OR USB wireless): For on board, you need to go into Bridged connection, then in windows NIC in device adapters, disable everything but VirtualBox NDIS6 Bridged networking driver, Link-Later Topology Discovery Responder, Link-Layer Topology Discovery Mapper I/O Driver.

No issues of yet, so far this seems to work fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.