VMware Communities
natv
Contributor
Contributor

Wired LAN to Virtual Machine, while Host uses Wifi for Internet?

I know how to connect a USB device to the VM directly (such as a USB WiFi dongle), but today I had a different need and couldn't get it working reliably.

I was doing a CTF (first timer), and we were provided with LAN access to the CTF environment (which did not have Internet access). I wanted to be on that from inside my Kali linux machine however,  and have my host (Windows 10) have Internet access.

With both the LAN plugged into my laptop and my WiFi on tethered to my phone (for internet access), I was getting mixed results. At some random point (after unplugging/plugging in the LAN cable over and over each time I needed to get on the wifi to Google something), it finally started to work both ways (the host could get Internet as well as access the private LAN).   The linux VM wasn't seeing the USB wifi NIC but I think that's some other issue and not really related to my question, just wanted to explain the context of all this.

So what I need to know is.... if I want the VM to be directly on the LAN (bridged mode), which means my internal NIC on my laptop needs to be connected too, but my laptop ALSO needs to use my WiFi to connect to my phone hotspot..  how can I make sure this will work next time? I think I just got lucky that somehow it started to work later.

I think the issue is my laptop being connected to both a wired and wireless network at the same time.

Thanks

0 Kudos
2 Replies
xindayu
Enthusiast
Enthusiast

Hi natv,

You can try to change the virtual bridge setting to make VM only bridged to one adapter on your host.

Here are the steps:

1. Click "Edit" -> "Virtual Network editor"

2. Click VMnet0 tab, change the "Bridge to" setting to a specific network adapter on your host.

After the steps above, your VM will bridge to the specific adapter.

Thanks!vne.png

0 Kudos
natv
Contributor
Contributor

Thank you!

0 Kudos