Change network from the one given by the host

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
reallywhatwhat
Posts: 8
Joined: 26. Jun 2022, 11:38

Change network from the one given by the host

Post by reallywhatwhat »

I've been working on virtual machines but one problem I can't figure out is the network change. If I want a different network than the one given by the host machine, and be free to use a hotspot or whatever....why is that not possible or so hard to do? There must be a way to do it. Please help if you can. This is also a problem when hosting linux and windows
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Change network from the one given by the host

Post by scottgus1 »

Interesting question! The VM has to use the host hardware, so it is usual that the VM network will go through the host network devices.

Computers typically use a hot-spot via Wi-Fi or USB tethering. Virtualbox does not provide Wi-Fi adapters for the VMs, only wired Ethernet adapters.

However, there are two methods to allow hot-spot or tethering connections, made possible through Virtualbox USB Filters. You can provide your own USB Wi-Fi adapter and pass the device into the VM OS. Or you can pass a wired USB phone for tethering into the VM OS. See USB basics and troubleshooting. The VM OS will need drivers and apps for the Wi-Fi device or tethered phone. The host OS will not see the Wi-Fi adapter or tethered phone while the device has been passed into the VM.
reallywhatwhat
Posts: 8
Joined: 26. Jun 2022, 11:38

Re: Change network from the one given by the host

Post by reallywhatwhat »

scottgus1 wrote:Interesting question! The VM has to use the host hardware, so it is usual that the VM network will go through the host network devices.

Computers typically use a hot-spot via Wi-Fi or USB tethering. Virtualbox does not provide Wi-Fi adapters for the VMs, only wired Ethernet adapters.

However, there are two methods to allow hot-spot or tethering connections, made possible through Virtualbox USB Filters. You can provide your own USB Wi-Fi adapter and pass the device into the VM OS. Or you can pass a wired USB phone for tethering into the VM OS. See USB basics and troubleshooting. The VM OS will need drivers and apps for the Wi-Fi device or tethered phone. The host OS will not see the Wi-Fi adapter or tethered phone while the device has been passed into the VM.
Thank you for the answer. They say that virtual machines are for hacking but if you use the same IP of your main computer, how easy is to trace you?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Change network from the one given by the host

Post by mpack »

reallywhatwhat wrote: They say that virtual machines are for hacking
Who is "they"? I've never heard anyone say that. Virtual machines are IMO for testing, sandboxing, and keeping old software alive.
reallywhatwhat wrote: if you use the same IP of your main computer, how easy is to trace you?
You talk like there's some choice in the matter. By "the IP of your main computer" I assume you mean a LAN IP address. Your LAN IP address is local (the "L" in LAN), it is not visible to the outside world. If you go through an Internet service provider then the WAN IP address the world sees is the one they assign to their end of the cable connected to your router. ALL devices on your side of that gateway, virtual or physical, appear to the world to be using that same ISP assigned IP address, if they communicate on the wider Internet at all.

So, anybody you told you that this situation could be changed by using a VM (on your LAN) instead of a physical PC (on your LAN) is an ignoramus and needs to be de-friended with immediate effect.

The only way for your device (and being a VM makes no difference here) to appear to have a different WAN IP is to route all your traffic through an external server, i.e. a VPN service.
Post Reply