Ticket #10740 (closed defect: worksforme)
NAT + Host-only networking
|Reported by:||nemonik||Owned by:|
|Version:||VirtualBox 4.1.18||Keywords:||host-only, ubuntu precise64|
|Host type:||Mac OS X|
Via "Preferences->Network" I configure a 'vboxnet0' Host-only Network (IPv4 Address: 10.42.0.6, and IPv4 Network Mask: 255.255.255.0, IPv6 Network MAsk Length:0), then create a guest VM with two adapters: adapter 1 (NAT), and Adpater 2 (Host-only adapter, 'vboxnet0'). I install ubuntu-12.04-server-amd64.iso, and once up configure /etc/network/interfaces like so:
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 10.42.0.6 netmask 255.255.255.0
Back to the cmd-line execute:
All the VMs interfaces are up including the host-only adapter
Running ifconfig on the host returns:
vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether 0a:00:27:00:00:00 inet 10.42.0.6 netmask 0xffffff00 broadcast 10.42.0.255
I shut off sshd on my host, and then attempt to ssh to 10.42.0.6, and I cannot ssh in, but from the vm I can ssh to 10.42.0.6 with no problem. If I turn on sshd on my host, and attempt to ssh into 10.42.0.6, I instead appear to be connecting to the host, and not the guest vm.
I'd like the VM to have access to the Internet via the NAT adapter, and be able to access the VM via the host-only adapter, and this isn't happening.