Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just noticed the following. I use an Ubuntu 13.04 desktop as Virtualbox host. On the host I have two ethernet connections configured. There is only one network card, and the network cable is connected to a working router. I use it to switch configuration because sometimes I use this desktop to login on a second router which has a different network range. I switch cables to the second router, switch the network connection in Ubuntu, and can login.

Today Ubuntu switched the connection without me noticing it. The network cable was still connected to the normal router. I started Virtualbox, started up the browser on the guest OS and could browse the internet. On the host I could not browse the internet. After a while I noticed that the connection had switched. After setting it back to normal everything worked like it should.

I would think that all network traffic is passed through the host OS, so host firewall rules and connection settings would limit the guest, but apparently it isn't so.

Can somebody explain how this works? And does this work for Windows or OSX as well? I can't test that at the moment, but am interested if somebody wants to try.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

It sounds like your virtual machine is configured to use networking in bridged adapter mode. When it uses a bridged adapter, I like to think of it as it being directly connected to your network and as such - host networking and firewall rules don't usually apply (at least in my experiences). Here is the description from the Virtualbox website about bridged networking. Hope this helps you on your quest :-)

From the Virtualbox Site:

With bridged networking, VirtualBox uses a device driver on your host system that filters data from your physical network adapter. This driver is therefore called a "net filter" driver. This allows VirtualBox to intercept data from the physical network and inject data into it, effectively creating a new network interface in software. When a guest is using such a new software interface, it looks to the host system as though the guest were physically connected to the interface using a network cable: the host can send data to the guest through that interface and receive data from it. This means that you can set up routing or bridging between the guest and the rest of your network.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.