Page 1 of 1

Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 15:39
by gpsfreak
Has anyone managed to get bridged networking in a Linux guest VM such as Ubuntu or Mint? I recently posted this issue on Superuser and Mac-forums forums and have not been able to get it resolved. This forum has several posts about Windows guests also not being able to get bridged working.

Windows 7 hosts don't seem to have this problem, so now I wonder if there is some limitation with the Mac OS host itself (using OS X Lion on a new Mac Mini to host my VMs). Can anyone confirm this?

Thank you!

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:00
by michaln
gpsfreak wrote:Has anyone managed to get bridged networking in a Linux guest VM such as Ubuntu or Mint?
Yes. For example on MBPs running OS X Snow Leopard 10.6.8 or Lion 10.7.2.
Windows 7 hosts don't seem to have this problem, so now I wonder if there is some limitation with the Mac OS host itself (using OS X Lion on a new Mac Mini to host my VMs). Can anyone confirm this?
No.

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:23
by gpsfreak
Thank you for your reply michaln.

Would you mind sharing your settings in the mac host and the linux guest? I've tried all combinations and still can't get it to work. Also, which LInux guest OS are using in the VM? And what are MBPs please?

Thanks!

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:26
by michaln
Why don't you instead explain what "can't get it to work" means... I didn't do anything special on my end.

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:29
by gpsfreak
For example, one set of settings I tried:

Mac config:

Network setting: en3 configured by DHCP
Sharing setting: Internet Sharing selected, Share connection from en3 to computers using en3

Virtualbox Linux setting:

Network setting: Bridged Adapter, Name: en3

I can ping from host (192.168.2.1) to guest (192.168.2.2) and guest to host, but I Cannot ping from the Linux guest to the outside world. Connection in host is up, because I can ping from the Mac host to the outside world.

For any variation I've tried, the VM won't connect to the internet with bridged networking.

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:38
by gpsfreak
My Mac OS host is connected over WiFi. All other host settings are off: en3, etc.

Another VirtualBox Device setting I tried is: Bridged via en0. Is this right?

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:39
by michaln
Why are you setting up Internet sharing on en3? Is that supposed to be for the VM?

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:40
by gpsfreak
michaln wrote:Why are you setting up Internet sharing on en3? Is that supposed to be for the VM?
That was just one of many settings I tried. Which should it be?

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:43
by michaln
gpsfreak wrote:My Mac OS host is connected over WiFi. All other host settings are off: en3, etc.

Another VirtualBox Device setting I tried is: Bridged via en0. Is this right?
Is that a different system?

I don't know if bridging en0 is the right setting. You need to bridge whichever interface gets DHCP (usually) and can talk to the outside world.

So if en0 is wired Ethernet with no cable and your host is actually on WiFi on en1, you can bridge en0 but the guest will behave just like a system that has no cable plugged in. If you want to get out, you need to bridge en1.

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:45
by michaln
VirtualBox does not need to have any internet sharing set up. Never did. I don't know if it harms anything, but it certainly won't help. Was that your idea, or did the suggestion come from somewhere else? Certainly not the VirtualBox documentation...

Re: Can't get Bridged networking on Linux Guest

Posted: 23. Feb 2012, 16:48
by gpsfreak
That did it! I changed the vm to bridge via en1 and now works. Thank you michaln!