Internet exclusively on a Linux virtual machine?


  1. Posts : 3
    Windows 10
       #1

    Internet exclusively on a Linux virtual machine?


    I have Windows 10 and run Linux on a virtual machine in VMware.
    Is it possible to set it up so my internet traffic only runs through the Linux VM and not through Windows? I figure this would be a good setup for security.
      My Computer


  2. Posts : 17,661
    Windows 10 Pro
       #2

    I do not know if that is possible in VMware. In Hyper-V that is very simple, you just need to unselect Allow management operating system to share this network adapter in Virtual Switch Manager for your external virtual switch:
    Internet exclusively on a Linux virtual machine?-2016_04_11_05_41_541.png

    • Selected = host and virtual machines have Internet connection
    • Unselected = virtual machines have Internet connection, host not
      My Computer


  3. Posts : 3,367
    W10 Pro x64/W7 Ultimate x64 dual boot main - W11 Triple Boot Pending
       #3

    The one problem that will bring is not being able to receive the normal security and other patches by way of the Windows Update function despite offering an isolated from web host OS. VMware's Workstation 12 Player notes indicate the "Host-only" type network option for private networking between host OS and VMs being one option.

    Host-only The virtual machine and the host virtual network adapter are connected to a private Ethernet network. The network is completely contained within the host system.
    The help topics can be looked over at VMware Workstation 12 Player for Windows Documentation Center

    The VMtools installed on the host OS are what are configured for the options available with more seen in the Configuring Network Connections links.
      My Computers


  4. Posts : 11,247
    Windows / Linux : Arch Linux
       #4

    Hi there
    Should be simple in VMWARE

    Set the Windows VM Internet connection up via the Linux machine - use the Linux machine as the gateway or a Proxy server for the Windows machine. (The fact that the Linux VM is a Virtual machine doesn't matter -- works just like it would if it were a physical machine).

    That way you still have Internet access on both machines but controlled Internet access on the Windows VM. This way you can still get access to services like Windows update and if you want to run say OUTLOOK as an email client on the Windows VM.

    I use EXCEL a lot with data taken from the web so if you want to do that type of activity on the Windows machine you will have to let it have some Internet capability --controlling it via the Linux machine makes decent sense.

    (What's the HOST OS you are running these VM's on -- you'll need to enable Bridged / NAT networking if using VMWARE).

    I'm actually messing around with ESXi at the moment but I'll gfet back with more details later on setting the Internet access up from the VM's.

    Do the VM's also need to be accessed remotely OUTSIDE your LAN -- I.E from the "public Internet" at large --that's another issue and creating a VPN might be best for that scenario.

    Please though specify your HOST OS is and what VM software you are using e.g VBOX / VMWARE / HYPER-V / KVM etc.

    Edit : Sorry - I see you are using WINDOWS as HOST

    -- OK still the same thing - just treat the Linux VM exactly as if it's a separate REAL machine on your network. Give it a FIXED IP address on your own network (you can use DHCP for the rest of the network - most routers etc allow you to specify some fixed IP addresses and start DHCP from say 192.168.0.10 or whatever.

    Then apply PROXY to IE / Edge on Windows while allowing relevant Internet access to the VM machine -- simply use BRIDGED /NAT in the VMWARE settings.

    If you even DISABLE Internet access in the Windows machine you'll still have it on the VM.


    Cheers
    jimbo
      My Computer


  5. Posts : 3,367
    W10 Pro x64/W7 Ultimate x64 dual boot main - W11 Triple Boot Pending
       #5

    KVM is mostly 32bit from their main description. KVM

    Kernel Virtual Machine

    KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko.
    Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.
    KVM is open source software. The kernel component of KVM is included in mainline Linux, as of 2.6.20. The userspace component of KVM is included in mainline QEMU, as of 1.3.
    Blogs from people active in KVM-related virtualization development are syndicated at http://planet.virt-tools.org/


    The question for skeen is which kernel as far as 32bit or 64bit OSs are being planned since that isn't specified so far. Both Hyper-V default in the 64bit Windows will support the 32bit/64bit Windows VM(s) if that is what you have for 10 there as well as the 32bit/64bit Linux VM(s). As for ESXi that would be the VMware vSphere Hypervisor app there.

    For the 10 side you can also download the Windows Live Essentials 2012 mail app to see mail imported from an outlook.com account or any older Windows Live Mail account formerly seen at live.com or Live Hotmail. That was brought out for 8 initially as a replacement for the Windows Mail app.

    As for isolating the VM as far as web access disabling the physical network adapter in the Device Manager while leaving the Virtual Network adapter enabled should only only the VM to connect. Then a fast trip into the DM to see the physical adapter enabled temporarily again would allow for the Host OS updates.

    Once tended to you would simply disable that again used only for periodic manual checks while disabled the bulk of the time. I think this would be the type of set up you are looking for since the host OS still has to initially have a working connection in order to get the VM to connect. The thing to add here is that the Hyper-V feature only allows for one VM to run at a time while VMware's Workstation Player can have two or three running simultaneously depending on the overall host resources and how much memory is allocatted per VM.

    Even on the second mini tower case I access remotely here that sees a 7 upgraded to 10 VM project I ended replacing the pair of 2gb dimms with a new pair of 4gb dimms to max that out to avoid seeing the "out of resources" error when not having enough physical memory installed. Found that one out fast years back when trying to run multiple VMs with the VM Player.

    Internet exclusively on a Linux virtual machine?-multi-multi-tasking-oss.jpg
      My Computers


  6. Posts : 11,247
    Windows / Linux : Arch Linux
       #6

    Hi there

    I think the OP just wants to run W10 as HOST and the Linux OS as GUEST. Running KVM isn't actually easy anyway.

    I think the simplest solution is the one I outlined -- in your Router assign a fixed IP address for the Linux VM, Enable Bridge or NAT networking in your VM software, disable Internet settings in Windows (via Firewall / IE settings / other browser settings) and job done.

    In IE it's even simpler -- just disable the automatic settings -- then add manual addresses like 1.0.0.10 for gateway / DNS server etc -- then you won't get Internet on IE.

    Should be similar settings on Edge / FF/Chrome -- Firewall is probably the easiest way to block Internet from the HOST (Windows) anyway. Allow the Linux VM with the specific IP address through.

    Your router also might have settings that allows IP addresses through and blocks others. That would be even easier still.

    BTW if you can run the VM's in the background you can logon to the VM remotely without even needing an account on the HOST --that's how a lot of Virtual Servers work.

    Host Only Networking will probably disable the Virtual network adapter for Internet access so I suspect this method will fail unless your VM can use the Physical hardware network adapter -- ands of course this doesn't stop the HOST(Windows) from accessing the Internet which I gather is what you want to do.

    Cheers
    jimbo
      My Computer


  7. Posts : 3,367
    W10 Pro x64/W7 Ultimate x64 dual boot main - W11 Triple Boot Pending
       #7

    The desired goal is avoid any Host-only type network deal and the actual goal would be to set up a private vm test network to find out how to work out the VM only type network. Unchecking the auto detect for network settings in Windows as well as disabling the Windows not VMware network adapter item in the Network & Sharing?Network connections would be a start. You might actually need a separate VM to act as the network gateway much like how a router works.

    Regarding vSphere here's the Managing Hosts in vCenter Server section that may be an option. Another item of interest in regards to VMware would be the option to add or remove the Host virtual network adapter while maintaining the VM network configuration. Enabling, Disabling, Adding, and Removing Host Virtual Adapters

    That applies to both Windows and Linux host OSs.
      My Computers


  8. Posts : 11,247
    Windows / Linux : Arch Linux
       #8

    Hi there.

    Assuming you are using VBOX or VMWARE as your Virtual Machine software - disabling the network adapter in the HOST would fail as then the Virtual Network adapter in the VM would be "Non Functional" --unless you could access the hardware adapter directly.

    I had the reverse on a Linux host with a USB 3 wireless adapter which the Linux Host failed to get working -- however when this was attached to the Windows host in the VM and the windows driver loaded it worked and the windows VM could access the Internet whilst the host had no access.

    I don't think you could do this with the built in LAN adapter -- both VBOX and VMWARE will only load drivers for Removable hardware (usually connected via a USB port).

    Esxi or HYPER-V might do it though via Passthru.

    Fiddling around with Wifi adapters on Linux is usually a messy task - and it's touch and go whether they work or not- whereas the ethernet ones invariably work -usally Broadcomm or Intel adapters.

    Cheers
    jimbo
      My Computer


  9. Posts : 3,367
    W10 Pro x64/W7 Ultimate x64 dual boot main - W11 Triple Boot Pending
       #9

    Well there actually two Physical as well as two Virtual network adapters you have to consider. The first of course are found in the Device Manager if you have a nic card installed in particular as well as the Virtual adapter since the VM needs a physical representation. Then you have the adapters you find in the Network & Sharing Center that are actually both the software adapters that can disabled individually without effect of one on the other! That's where you knock out the Windows adapter with a fast right click to disable while not having any effect in the DM as far as how the Virtual adapter will still connect. In fact while having problems connecting on the remote pc where 7 cannot connect by ethernet but only by the usb WiFi adapter the 10 VM at the time was still able to get online without issue!

    The VM would access the nic card instead that was only in use when booted on the 10 physical side of the dual boot there. Once I reconfigured 7 to the WiFi adapter when that was plugged back in both were then able to connect. When first built back in 2013 the 7 Pro case was intended to be a portable Lan party type deal having the carrying handle on the case for fast set up on the fly as well as being able to move it from room to room without worry.

    Once 10 came along however I was need in a second pc for test purposes. Two physical OSs requiring two different types of connections and the VMs on WS 12 can be run from the 7 side without the WiFi adapter even being plugged in to see 7 totally cut off. I would think the same could done elsewhere to see the host OS configured wireless and then simply unplug the wireless while the VM is configured for hard wire. Or you could reverse things having the VM set up for WiFi with the host unplugged.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:27.
Find Us




Windows 10 Forums