I’m running VirtualBox on Mac OS X 10.10 (Yosemite) with a VirtualBox guest running Fedora with Gnome.

I have set this up in VirtualBox with a host only adapter to allow my host to access an Appium server on my guest via its IP address (this works flawlessly). The Appium process in turn needs to access a server back on my host machine - this is the part I’m struggling with.

When I attempt to ping my host by its IP from the guest, I get “Network is unreachable.”

How can I set up virtualbox to allow my guest to connect to my host, while maintaining the ability to connect from my host to the guest (the host does not need any wider connectivity)


NAT is an option if you ONLY ever want to use that machine from your Mac.

Taken from another question (in regard to VMware, but the concept stands)


"NAT Mode : Your host computer (the Mac) will act as a gateway to the network for your virtual machines, nobody on your network (apart from the Mac) will be able to see them since they're sitting in a separate network

Bridged Mode : Your host computer (the Mac) will share its network connection with the virtual machines, they'll be sitting as if they were another computer on your network, everyone on the network will see them and be able to interact with them."

Say you ever want to access that machine from somewhere on your network. You'd want to set up a bridged adapter and a host only adapter.

Therefore steps:

1) Ensure that 2 network adapters are configured

  • Adapter 1 = Bridged Adapter - NIC name
  • Adapter 2 = Host-only Adapter - VirtualBox Host-Only Ethernet Adapter

2) Make sure the NAT adapters and the Host-only adapter aren't in the same subnetwork. So make it something like Eth0 = & Eth1 =

3) Make sure the correct MAC addresses are assigned for each adapter


It turned out to be fairly simple. I just set adapter 2 to NAT. This allowed my guest full connectivity to the network and as a result it could access the guest by IP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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