What more do I need to have fully bridged networking?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
CJSHayward
Posts: 4
Joined: 3. Jul 2017, 21:26
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows
Contact:

What more do I need to have fully bridged networking?

Post by CJSHayward »

The network I'm on has 10.0.0.0 addresses.

I have an OSX 10.12.5 host, on which ifconfig reports a 10.0.20.3 address, and a Mint 18.1 guest under VirtualBox 5.1.22r115126, on which ifconfig reports a 10.0.2.15 address. The guest, which I am building as an appliance to serve up useful open source tools on different ports, seems to have normal network functionality when accessed from within the guest.

On the server and the mobile device, however, I have only had connection timeouts connecting on just port 80 (inside the guest I can access localhost from a web browser). Mint says that the firewall is off, and I haven't really tried to build up or change anything beyond getting open source websites each on their own port (to be available on a LAN where it may not be an option to have a DNS give a FQDN for each VirtualHost).

Could you confirm that the expected behavior of bridged networking would mean that browsers on other computer should be able to get the same access from the guest's ifconfig-provided IP as access by that IP from within the guest?

If so, what should I investigate next?

I got one comment on a non-VirtualBox forum:
Your question is confusing; "the server and the mobile device" are undefined. I have no idea where they are on the network relative to your guest VM. But, I suspect you have not setup routing from the "real" network on the host to the guest. VirtualBox probably made a NAT rule for allowing the guest to get out, but probably did not create port forwarding rules or routing rules for your other devices to reach the guest. I'm not an expert on VirtualBox, so can't tell you how that's handled, but I'm sure there's support for port forwarding at the least, and possibly network routing, as well
I clarified:
Thank you. By "server" I meant the OSX host which can't connect with the guest by IP, and "the mobile device" was a separate device used to test availability on the LAN from something other than the host. Is port forwarding going to help if even the host cannot connect to the guest normally?
C.J.S. Hayward
(Google for my website)
BillG
Volunteer
Posts: 5104
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: What more do I need to have fully bridged networking?

Post by BillG »

If the vm has an IP of 10.0.2.15, I wold say that you are using the default setting of NAT. If you want the vm to be bridged to the physical LAN you will need to set it to bridged, and bridge it to the physical NIC in the host. If there is a DHCP server on the LAN, the vm should get a suitable IP from there.

Have a look at the options offered in the Network section of the vm settings.
Bill
CJSHayward
Posts: 4
Joined: 3. Jul 2017, 21:26
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows
Contact:

Re: What more do I need to have fully bridged networking?

Post by CJSHayward »

I at least tried to set it on bridged networking:

Image
C.J.S. Hayward
(Google for my website)
BillG
Volunteer
Posts: 5104
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: What more do I need to have fully bridged networking?

Post by BillG »

This is certainly not expected behavior. Bridged networking does not always work well with wireless networks, but this does not look like the problem here. If you have set the NIC to bridged mode and the guest is set to get its IP automatically, it should either work or it should fail because it can't get an IP from DHCP. It should not still have its NAT IP.

Does the host get its IP address from DHCP on the LAN?

I am not a Linux/Apple person so I am not familiar with the tools you need to use to sort this out.
Bill
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: What more do I need to have fully bridged networking?

Post by scottgus1 »

Bridged puts the guest in the host's network, to act as if the guest were merely another computer on the LAN, with all the capabilities another computer on the LAN would have. (Subject to the known Bridged/Wi-Fi glitch possibility. if you have to run a server guest, go wired, via USB adapter if necessary.)

Interestingly, you report that your network IP range is "10.0.0.0 addresses", and your host's IP address is 10.0.20.3. Is this a typo? According to Wikipedia the "10" private IP range can run in one huge network from 10.0.0.0 – 10.255.255.255. So a 10.0.2.15 IP address previously given by Virtualbox's NAT might still appear valid if the physical LAN is set up to allow it.

Shut your guest down, Set your guest to Bridged, reboot it, then run an ifconfig on the host and the guest and post the text outputs of each command in "CODE" tags here on the forum.
BillG
Volunteer
Posts: 5104
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: What more do I need to have fully bridged networking?

Post by BillG »

@scottgus1
It really depends on the netmask in use on the DHCP server. It could be using 10.0.20.0/24 (like NAT uses 10.0.2.0/24). They rarely use 10.0.0.0/8 . That's a lot of addresses for one network.

We will have to wait for more info.
Bill
gadgetricks
Posts: 2
Joined: 18. Jul 2017, 05:28

Re: What more do I need to have fully bridged networking?

Post by gadgetricks »

Following too
Post Reply