Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to setup a Hosts-only Adapter so I can connect to it. It says that invalid settings detected and the name: drop-down isn't populated. What am I doing wrong and how can I rectify it?

My Host is and my guest is .

enter image description here

share|improve this question
Why are you using Host only Adapter, it's primarily for communication between hosts, use NAT instead – HackToHell May 27 '12 at 15:24
@HackToHell I'm using it so I can http into the guest OS. – Kit Sunde May 27 '12 at 15:32
By http, you mean run a web server in the guest, NAS will work, Host Only is not neeeded – HackToHell May 27 '12 at 15:33
@HackToHell I'd prefer not to do port forwarding and couple my local machine ports to the VM. I'd like to be able to access the VM on an IP I've assigned it, but not have to adapt to an external DHCP server. So I'm trying to go down this route: – Kit Sunde May 27 '12 at 15:48
@HackToHell, Host Only is needed in a couple of scenarios which is why every VM provider offers it. This is not helpful input. – Rob Osborne Aug 3 '12 at 15:18
up vote 45 down vote accepted

It seems like these adapters are added in Virtual Box -> preferences -> network.

enter image description here

share|improve this answer
wow that did the trick! +1! – FLY Aug 3 '12 at 9:20
wow indeed, who writes user interfaces like this? – Rob Osborne Aug 3 '12 at 15:13
wow somebody wants all vm to be accessible! that's why. – CppLearner Mar 31 '13 at 5:15
note: I've encountered situation where "preferences" menu item is not displayed. Restart virtual box if encountered and it should show up. – harschware Mar 17 '15 at 17:58
Actually, no restart needed. This happens when the "Oracle VM Virtual Manager" is not the foreground window. If your VM is the foreground window it will be missing from the "VirtualBox VM" menu. As of VBox 4.3.18 – harschware Mar 17 '15 at 18:15

In order to have bidirectional access please follow next steps ...

It's very important that after (Virtual Box -> Preferences -> Network -> vboxnet0) to configure your firewall.

  1. Allow routing (ip.forwarding)
  2. Allow NAT through fireall

OSX firewall sample

    # (I) Firewall config /etc/sysctl.conf
    sysctl -w net.inet.ip.forwarding=1 net.inet.ip.fw.enable=1
    sysctl -a net.inet.ip.forwarding net.inet.ip.fw.enable

    ipfw list
    ... shoud have ....

    # (II) Enable nat access to /etc/pf.conf
    #============add your host-only vlan =================
    # this commented lines doesn't work after computer reboot
    #nat on en0 from vboxnet0:network -> (en0)
    #nat on en3 from vboxnet0:network -> (en3)
    # this will work in any situation
    nat on en0 from to any -> (en0)
    nat on en3 from to any -> (en3)        

    # Reload pf
    pfctl -f /etc/pf.conf
    pfctl -e


share|improve this answer
I'm confused by this answer. Immediately after changing my VM network to Host-only adapter, I looked on OSX host for /etc/sysctl.conf but the file was not there. I checked ifconfig on the guest to see the new adapter present, but did not have an IP4 address. I checked for that file on CentOS6.6 guest and found it, found 'net.ipv4.ip_forward = 0'. set it to 1, saved file, and immediately a IPV4 address became available. I could use it to ssh to the VM from the host and another guest configured the same way. – harschware Mar 17 '15 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .