Page 1 of 1

Prevent change of bridged connection on disconnect

Posted: 9. Jan 2014, 18:20
by Wiglet
I'm running VB 4.3.6 on Win 7 hosting Ubuntu 12.04 as a guest machine. The host machine is connected to a corporate LAN via ethernet and by USB to a smartphone. I believe Windows connection bridging has been disabled. I want the guest machine to only ever use the phone connection so in VB I set the machine to bridged mode and selected the phones connection. This works fine. However if the phone is unplugged VB reverts to the only other connection on the system, the corporate LAN. This seems to get detected by the network servers and causes the LAN connection to be disabled. I assume this is to protect the network from unauthorised machines.

Naturally I can either shut down the virtual PC or disconnect it before unplugging the phone. However I suspect I may forget or accidentally unplug it at some point.

Is there anyway I can I can configure Windows, VB or the guest to prevent the guest ever connecting to the corporate LAN?

Re: Prevent change of bridged connection on disconnect

Posted: 9. Jan 2014, 23:36
by noteirak
Nothing can be done on Virtualbox side.
Use the Windows firewall to block Virtualbox on a specific interface.

Re: Prevent change of bridged connection on disconnect

Posted: 10. Jan 2014, 01:19
by BillG
If you look at the properties of the NIC connection from the host, do you see an entry for Virtualbox Bridged Networking Driver? If you clear the checkbox for this entry, the vm should not try to use the NIC at all.

Re: Prevent change of bridged connection on disconnect

Posted: 10. Jan 2014, 14:03
by Wiglet
@BillG do you mean like this? If so I like it a lot!
Screen shot of NIC properties with "VirtualBox Bridged Networking Driver" turned off
Screen shot of NIC properties with "VirtualBox Bridged Networking Driver" turned off
NICproperties.png (37.94 KiB) Viewed 911 times

Re: Prevent change of bridged connection on disconnect

Posted: 10. Jan 2014, 14:31
by Wiglet
I think my original post is not totally accurate. When the phone is unplugged nothing actually changes in the VB settings. Naturally the guest has no connectivity. Looking at the VB Manager screen I can still see that Adapter 1 is set to the now none existent phone connection. However if I look at the Network properties of the guest the name has changed to the corporate NIC. I think this setting is only actually applied of the "OK" button is clicked. If I click "Cancel" nothing changes.

This is all a bit moot now however. By applying @BillG's change the corporate NIC no longer appears as an option so it is impossible to accidentally apply it.