0

It seems that when I make a new virtual machine, my private networks are not reachable from the host. I assigned different IP addresses to both, and included them in my /etc/hosts file, however I'm not able to access them via browser.

I've since deleted my second virtual machine, but still unable to access the one Vagrant VM via browser.

I've setup a forwarded port as well as a private network IP

Has anyone encountered something similar?

When doing netstat -rn I didn't see my private network listed

1 Answer 1

1

I do not have specific knowledge of Vagrant, but with virtualization in general your network type must be either bridged or NAT mode to reach your outside network. If you are assigning a static IP to the VM, your gateway address in the VM must match your host's gateway address (for bridged mode), or the NAT gateway address (if in NAT mode).

It is possible to run VMs in host-only networking mode, but that requires that you set up your host machine to be a router. It's a much more complex setup that way (and not recommended, since the whole point of host-only networking modes is to isolate the VM).

VirtualBox additionally has an internal network option. Using this option, the VMs cannot even communicate to the host; only with each other.

1
  • It seems I needed to reboot my host machine and vm for the static IP address to show when doing netstat.
    – a7omiton
    Apr 21, 2015 at 21:58

You must log in to answer this question.

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