3

I have a personal Linux laptop. I bring this to work and boot up a Windows VM. This is where I do work things. I would like to plug an ethernet cable into my laptop and pass that internet only to the VM. I use a hotspot I purchased for WiFi and would like my OS connected to this.

I would like to keep work network and personal network completely separate so they do not talk. Is this possible?

If this gives any insight to the problem it is a US government facility, specifically DHA.

2
  • 2
    It may be possible. You should specify what VM software you are using and what chipset the ethernet interface uses. I've not played with it, but I would imagine that for KVM, even if you can't pass the ethernet directly to the VM, you should be able to get a USB internet adapter and use USB passthrough?
    – davidgo
    Commented Aug 10 at 8:27
  • 1
    Looking at PCI passthrough (and again, I'm not an expert here), it looks to me that it depends on the CPU and BIOS - It looks like you need IOMMU support to do PCI passthrough (ie VT-d for Intel or AMD-Vi for AMD devices) as well as appropriate kernel parameters.
    – davidgo
    Commented Aug 10 at 8:33

1 Answer 1

2

There are two ways you can do this:

  1. Create a bridge interface bound to the Ethernet adapter and connect the VM’s virtual NIC to that bridge interface on the host side, without assigning any IP for the host system on the bridge.
  2. Use PCI passthrough to expose the physical NIC directly to the VM.

In terms of security, the second approach is better as it makes it almost impossible for the host to monitor traffic or accidentally send traffic on the Ethernet interface.

However, it’s also much more dependent on the hypervisor, and requires some nontrivial leg-work from you (you have to figure out the PCI address of the NIC, prevent Linux from binding a driver to it, and then get the hypervisor to attach any required host-side driver to it). In contrast, the first approach can be set up trivially without any kernel interaction and will work with essentially every hypervisor out there (though the way you bind the VM NIC to the bridge interface varies by hypervisor).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .