how to have 2 connections : 1 for the host,1 for the guest?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
noillex
Posts: 2
Joined: 11. Aug 2020, 09:17

how to have 2 connections : 1 for the host,1 for the guest?

Post by noillex »

Hello everybody,

I'm in a annoying situation , i need to access to a specific ressources on my host but i dont want connect my vm to the network who host the ressources , and so i connect a USB-ethernet-sharing device to have an another connection (here my phone) , so i want to connect my host to a network (A) and my vm to a network (B) and all the host traffic go to(A) and all guest traffic go to (B)

schema:

Code: Select all

 -----------------
| 		 		   |
| ethernet by box |				 -----------------------
|        (A)      |=============|     Host(win10)		|
 -----------------				  |	   (all A)		   |
						  				|							 |
							  			|	  --------		   |
							  			|	 |		  |		  |
 -------------------				|	 |   VM   |		  |
| 				      |================|(all B) |		  |
| ethernet by Phone |			  |	  --------		   |
|       (B)         |			   -----------------------
 -------------------


Did you know how can i do that?

Best regards
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: how to have 2 connections : 1 for the host,1 for the guest?

Post by scottgus1 »

Well-drawn ASCII art, noillex!

If you are passing the USB-Ethernet device directly into the guest using a USB filter (see USB basics and troubleshooting) then the only the guest can see and use that Ethernet port. It should behave just like a regular Ethernet card in the guest OS, and it provides an independent Ethernet channel for the guest OS that the host cannot see or use.

If the USB-Ethernet device is recognized by the host as another Ethernet channel and you are not using a USB filter in the guest, then you will have to set the guest's network card to Bridged, and Bridge to that USB Ethernet device. You will also have to turn off the host's ability to access that device in the device's Properties Bindings:

Image

Find the device in Control Panel > Network Connections, right-click the device and choose Properties, then uncheck all the checkboxes except 'Virtualbox NDIS6 Bridged Networking Driver'. Now only Virtualbox and any guests Bridged to that device can use that Ethernet port.
noillex
Posts: 2
Joined: 11. Aug 2020, 09:17

Re: how to have 2 connections : 1 for the host,1 for the guest?

Post by noillex »

Hello,

Thank you for your quick response !

I've tried your solution and i have a little trouble so i post the solution here for the next one in my situation :)

when i've finished the settings you have described,but my pc continue to connect to my usb network instead using my ethernet network, so i've changed the priority of the connection by the tutorial here and put my ethernet connexion to position 1 , and configure my vm connection to a bridge connection to my usb ethernet connection

and now i'm in the situation needed , my host connect trought my ethernet cable and my vm throught my phone ! :D

Thank you !
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: how to have 2 connections : 1 for the host,1 for the guest?

Post by scottgus1 »

Glad you were able to find a solution!

Interesting tutorial, btw, I did not know network connections could be prioritized like that.
Post Reply