Page 1 of 1

Internet access on virtual box

Posted: 9. Nov 2013, 21:11
by pdk
Hi ,

I am using the linux VB on windows host, in my work laptop, where it was configured to use the eth0 on LAN connection. I am trying to configure to use the same on my home where I am accessing the internet through the wireless lan. ( This is because my vpn on linux needs the internet access)

Could you please help me with this..

pdk

Re: Internet access on virtual box

Posted: 10. Nov 2013, 04:08
by noteirak
Not really clear what your issue is to be honest. Unless you clarify, I can only answer this :

- Reconfigure the VM to use the Wifi NIC instead of your LAN NIC
OR
- Use NAT mode instead of Bridged (if you are using Bridged?)

Re: Internet access on virtual box

Posted: 10. Nov 2013, 13:30
by pdk
Just changed the Bridged ( it was configured to) to NAT and worked :D . thanks a lot

Any simple explanation about the diff b/w Bridged and NAT ? I know basic n/wing ..

Re: Internet access on virtual box

Posted: 11. Nov 2013, 10:58
by noteirak
Bridged is using a filter on the NIC at layer 2 to capture the traffic to/from the guest.
NAT is an emulated network in memory of the VM process.

Re: Internet access on virtual box

Posted: 11. Nov 2013, 16:50
by pdk
Thanks a lot for the clarification :) .

But I donot understand, why it started working when i switched from Bridge to NAT, forgive me for my poor understanding on networking concepts :?
Both should have routed the packets to my VM ?

Re: Internet access on virtual box

Posted: 11. Nov 2013, 17:33
by noteirak
If you use Bridge, you must give it an interface to Bridge to, but you do not use the same interface at your different locations, so at one place, it is connected, at the other, it is not.
So if the interface is not connected, it is also not connected for the VM.

NAT comes from the Virtualbox process, and is handled by the host. Your host is responsible for the networking stack, and so it doesn't matter which interface is connected.
As long as one is, and there is some network, it will work.