The guest can access the host, but the host cannot access the guest on the "Virtualbox host-only" network


r

I'm trying to run an Ubuntu Server 16.04 guest in an Ubuntu 15.10 host in a host-only network in VirtualBox. I know very few questions like this, their configs are not exactly the same as mine, and I'm still confused after reading them.

Guests can ping and get data from the host and external websites.

The host cannot ping the guest or connect to any web services running on the guest.

I'm following these instructions but with some details changed.

in VirtualBox

A host-only network is created, vboxnet0with an address 192.168.100.0and netmask 255.255.255.0.

The guest has NAT for adapter 1 (default) and vboxnet0as adapter 2 .

on the host

#> ifconfig vboxnet0
vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00
      inet addr:192.168.100.0  Bcast:192.168.100.255  Mask:255.255.255.0

on the guest

This is/etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# Host-only interface
# vboxnet0 Host Only Adapter has address 191.168.100.0
# guest has address 192.168.100.1
auto enp0s8
iface enp0s8 inet static
        address         192.168.100.1
        netmask         255.255.255.0
        network         192.168.100.0
        broadcast       192.168.56.255

# NAT interface
auto enp0s3
iface enp0s3 inet dhcp

The interface name is not eth0etc, apparently this is due to kernel evolution, it should be fine.

After rebooting, this isifconfig

enter image description here

This seems to show the correct inet address enp0s8(it's a "host-only" adapter), and enp0s3is NAT, which seems to work fine.

if i runroute

enter image description here

I don't know how to interpret this exactly, but for some reason it lists 192.168.100.0it instead 192.168.100.1, which is ifconfigand /etc/network/interfacesthere is.

Edited in an earlier version of this question , the guest's static IP is not in the netmask range of the "host-only" adapter. Then, pingit seems to hang, now ping 192.168.100.1spawn from the moderator

PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
From 192.168.100.0 icmp_seq=1 Destination Host Unreachable

What's wrong? thanks.

r

It started working when I changed the IP vboxnet0address to 192.168.100.254instead 192.168.100.0.

Related


Setup Network on Virtualbox Guest to Access Host VPN

nixgadget I'm trying to get this setup going, but I'm having a lot of trouble. Host OS: Windows 8 64bit Guest OS: CentOS 6.5 64-bit I use the Cisco VPN client on the host to connect to many remote servers that I want to access from the Guest OS. Currently I ha

Setup Network on Virtualbox Guest to Access Host VPN

nixgadget I'm trying to get this setup going, but I'm having a lot of trouble. Host OS: Windows 8 64bit Guest OS: CentOS 6.5 64-bit I use the Cisco VPN client on the host to connect to many remote servers that I want to access from the Guest OS. Currently I ha

The host cannot SSH the guest, but the guest can

Samaras This is a follow-up question from: Getting virtualbox to get a different IP address than my laptop . I ended up using these files /etc/hostson both my laptop (host) running Ubuntu 14.04 and my virtual machine (guest) running Ubuntu 14.04 : 127.0.0.1

The host cannot SSH the guest, but the guest can

Samaras This is a follow-up question from: Getting virtualbox to get a different IP address than my laptop . I ended up using these files /etc/hostson both my laptop (host) running Ubuntu 14.04 and my virtual machine (guest) running Ubuntu 14.04 : 127.0.0.1

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access internet host from qemu guest via bridged network

Robert Munteanu I am trying to setup multiple qemu tasks on the same private network. I want them not to be accessible outside the host, but they should be able to reach each other and get resources from the internet. For context, this will be an important kub

How to access Vbox guest from host when using NAT network

Lance Baines Using Fedora or Ubuntu as the host, and having firewalls turned off on both ends (vbox guest & host), what can I do to access the guest machine using the NAT interface, just like using the bridged interface? (from vbox host only!) Update : ifconfi

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access internet host from qemu guest via bridged network

Robert Munteanu I am trying to setup multiple qemu tasks on the same private network. I want them not to be accessible outside the host, but they should be able to reach each other and get resources from the internet. For context, this will be an important kub

How to access Vbox guest from host when using NAT network

Lance Baines Using Fedora or Ubuntu as the host, and having firewalls turned off on both ends (vbox guest & host), what can I do to access the guest machine using the NAT interface, just like using the bridged interface? (from vbox host only!) Update : ifconfi

VirtualBox - "host only" with internet

Eduardo Lucio OK, friends! I really appreciate your help this time! = | I'm using the VirtualBox virtualization program, and I'm trying to make a guest machine only use a " host- only " network interface (VirtualBox) to access the internet . According to the o

VirtualBox - "host only" with internet

Eduardo Lucio OK, friends! I really appreciate your help this time! = | I'm using the VirtualBox virtualization program, and I'm trying to make a guest machine only use a " host- only " network interface (VirtualBox) to access the internet . According to the o

Can't access USB UART in VirtualBox Guest on macOS host

Martin I have created a virtualbox via docker-machine: $ docker-machine create --driver virtualbox default In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241. However, virtualbox

Can't access USB UART in VirtualBox Guest on macOS host

Martin I have created a virtualbox via docker-machine: $ docker-machine create --driver virtualbox default In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241. However, virtualbox

How can I install VMware Tools on the guest without host access?

Iter Actor I can access TeamViewer to a VMware virtual machine running Ubuntu. I want to install VMware tools on it, but can't, because all tutorials start with: Mounting the image... I can't access the host, only the guest. Alex Use sudo apt-get install open-

Can't access USB UART in VirtualBox Guest on macOS host

Martin I have created a virtualbox via docker-machine: $ docker-machine create --driver virtualbox default In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241. However, virtualbox

Can't access USB UART in VirtualBox Guest on macOS host

Martin I have created a virtualbox via docker-machine: $ docker-machine create --driver virtualbox default In the guest OS, I want to access my USB serial device, which is the Nordic nRF52840 DevKit, listed in macos /dev/tty.usbmodem144241. However, virtualbox

How can I install VMware Tools on the guest without host access?

Iter Actor I can access TeamViewer to a VMware virtual machine running Ubuntu. I want to install VMware tools on it, but can't, because all tutorials start with: Mounting the image... I can't access the host, only the guest. Alex Use sudo apt-get install open-

Unable to ping or access guest from host - vmware

crowd I have win7 OS with vmware workstation with debian 7. This is the IP configuration of the host (win 7) Connection-specific DNS Suffix . : IPv4 Address. . . . . . . . . . . : 10.47.235.94 Subnet Mask . . . . . . . . . . . : 255.255.255.255 De