I am running a web app on the VM.
I can see the app at localhost:8888
via a browser from within the VM.
I cannot see the app from the host at the same URL. That is the goal.
I tried VBoxManage modifyvm "VM name" --natdnshostresolver1 on
but it did not have an impact.
My configuration is:
- Host: Windows 7
- Guest: Ubuntu 16.04.1 LTS
- VirtualBox: 5.1.4r110228
(Guest) ifconfig
when on NAT
kirkland@GC:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:d0:fc:0e
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::4c67:70b5:c37b:8fa8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7431 errors:0 dropped:0 overruns:0 frame:0
TX packets:3587 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7444830 (7.4 MB) TX bytes:731870 (731.8 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1566 errors:0 dropped:0 overruns:0 frame:0
TX packets:1566 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:655936 (655.9 KB) TX bytes:655936 (655.9 KB)
(Guest) /etc/hosts
127.0.0.1 localhost
127.0.1.1 GC
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters