Configuring VirtualBox Networking

Just getting started setting up a homelab. I have VirtualBox running on a 2012 iMac that I wasn’t using. I also have a Synology DS1815+.

My first experiments are to get Ubuntu Server running in the VM, to use the Synology for storage and then to get Plex running to use the Synology for storage. If I can get that much running, then I can grow my wants/needs.

I’m working through Jay’s book, Mastering Ubuntu Server. I can’t ssh from the host ( to the VM that is Ubuntu Server ( What I really want to do is ssh from my laptop into the VM - but baby steps :wink:

Googling around indicates I need to set port forwarding in VirtualBox, but I can’t seem to get the right entries. I can’t ping the VM from the host.




Sorry for the late reply, I’m not getting notifications from this forum software when new topics are posted, for some reason. Working on it.

You shouldn’t have to do port forwarding in VirtualBox if you are using ethernet. Just set the networking option inside VirtualBox to bridged adapter, and set it to the ethernet port. Done. Wireless cards often lack the ability to do bridging, but VirtualBox can usually do it anyway, even on WiFi (not sure how, but it does work).

Port forwarding isn’t something I would think you’d need for this.

When I was using VB on windows I had several Centos and Ubuntu servers set up as a network. In bridge mode it worked wonderfully for Internet access or accessing other resources on the host. Where it becomes more difficult is when you want to access those servers from each other or from your own computer as though on a network and not from a host perspective. It can be done but is more complex and there is very little information on the Internet. There was some info in the VB documentation but you have to delve deeply and then de-cypher it and translate to suit your own requirements.

I was able to SSH from one server to another, but if tried from the host that did not work, probably for the same reasons mentioned above and this was before I sorted out the network connectivity from host to the VM servers.

In my experience, you should have no trouble accessing one VirtualBox VM from another if they are all on bridged networking. Anytime I use VirtualBox, I always set every VM to use bridged networking. In that case, they’re all getting an IP from your DHCP server, so that should definitely work fine. If you have a VM that’s not using bridged mode and others are, then the issue is that your routing table isn’t going to know how to route to those VirtualBox IPs from your LAN. For me, with using bridged mode on every VM in VirtualBox, life is easier.

I’m not sure if that was the answer you were looking for, but that’s what works for me.