Two different network connects in VB with Win 7

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
wvgeelen
Posts: 5
Joined: 17. Feb 2012, 17:49

Two different network connects in VB with Win 7

Post by wvgeelen »

All,

I have a (simple?) question about networking in VB. Situation which I would like to get is as follows:
1/ VB on Macbook Lion with Win 7 as Guest OS. I know how to do that :)

2/ Within Win 7, two (virtual) network connections:
* Network connection 1 = VPN --> this is to connect to my companies network to use email, chat & backend systems. This access requires a SSL VPN (Juniper Network Connect, which is not setup as a split tunnel. So, all traffic goes through the VPN; local resources in the 192.X.X.X. domain can't be accessed as long as the VPN is up).

* Network connection 2 = Local network (192.X.X.X), local file system on my macbook, local NAS, local network printer.

This setup, I think, would allow me to access my companies network & systems via the VPN, but - at the same time -
gives me access to files on my macbook, access to my local network printer & local NAS storage from within VB. Local here is in the 192.X.X.X. domain.

I understand VB can handle up to 8 virtual nics in different modes. Not sure whether my setup requires, say, two virtual NICS, where the VPN is bound to one virtual NIC and 192.X.X.X. to the other? Or something along those lines?

Thx in advance for any feedback!
KR,
Wilbert
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Two different network connects in VB with Win 7

Post by mpack »

The Win7 guest is just another PC on your network - so imagine that you bought a physical Win7 PC, you cabled it to sharing your Ethernet connection using a multidrop cable (equivalent of bridged) - how would you answer your own question then?
wvgeelen
Posts: 5
Joined: 17. Feb 2012, 17:49

Re: Two different network connects in VB with Win 7

Post by wvgeelen »

Hi mpack,

First off: thx for your response!

I don't think that I can answer my own Q already, unless I completely misunderstand you :) I understand that Win 7 is just another PC on my network, regardless whether this is virtual or not. Connecting Win 7 to my router is pretty straightforward and indeed works. Have tried that in the past.

The point is that when I setup a VPN in Win 7, all traffic goes via that VPN. My question still is: can I set up a second virtual NIC within that same Win 7, which does not use the VPN and to which all traffic with destination 192.X.X.X will be rerouted? So, think, for example, of a dual-bastion host/system like you would do when you put two physical NICs in one physical system: one NIC connected to the Internet, the other NIC to an internal network. In my case: two virtual different NICS, being active at the same time, doing their own routing, depending on the destination IP.

Not sure whether that does or doesn't change your answer?

Thx again!
KR,
Wilbert
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Two different network connects in VB with Win 7

Post by BillG »

It does not really change anything. The problem you talk about is not all that uncommon. A dedicated VPN can indeed take over a NIC and make it pretty useless for anything else. The solution on a physical machine is to have a second NIC with its own connection to the switch port, so that you can still use the local subnet when the fist NIC is effectively connected to the company LAN.

To get the same effect on a vm you may need to do just that - have a second NIC in the host machine. You could then create two NICs in the vm and bridge them independently one to each physical NIC. Simply creating a second NIC in the guest bridged to the same physical NIC in the host will not necessarily solve the VPN lockout problem. Posts in these forums in the past indicate plenty of failures and few successes with that approach.
Bill
wvgeelen
Posts: 5
Joined: 17. Feb 2012, 17:49

Re: Two different network connects in VB with Win 7

Post by wvgeelen »

Hi,

Thx for your response. Installing a second NIC in my macbook is simply not possible from a hardware point of view. It is not a big deal if my idea doesn't work. I can always kill the VPN for couple of mins to access local stuff. Not ideal, especially when I want to access local files on the same macbook, but doable.

I am going to play a bit with the network options in VB and take it from there.

Thx again!
KR,
Wilbert
Post Reply