I've tried the following posts, as well as skimming through the VirtualBox manual:
I have a fresh Ubuntu 14.04.2 LTS installation. I installed the version of VirtualBox 4.3 available through the software center. I created two images, a Windows 7 image which I got from the modern.ie site, and an Ubuntu 14.04.2 LTS image which I created from an ISO disk image download from the Ubuntu site.
On the host computer, I am running a Tomcat server at port 8080.
The problem I'm having is that using 10.0.2.2 in my guest system hosts files as indicated in other threads does not work. I've tried both the bridged and default NAT network configurations. I also disabled the firewall in the Windows guest just in case.
My Ubuntu guest hosts file:
127.0.0.1 localhost 127.0.1.1 myguestimage # 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 10.0.2.2 myhostimage.site.org
My Windows guest hosts file:
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # (SNIP!) 10.0.2.2 myhostimage.site.org
The network tab on each of my Virtual Host boxes looks like this:
When I browse to http://myhostimage.site.org:8080 from a browser on either host image, the connection times out. I'm expecting to see the Tomcat server.
Next I tried switching to bridged networking, which didn't work. Then I tried changing 10.0.2.2 in the guest hosts files to the IP address of my host (192.168.1.41), which I got from running ifconfig. This hasn't worked either.
In the bridged/192.168.1.41 configuration, I ran nmap on the guest against the address of the host tomcat server and got the following.
me@myguestimage:~$ nmap myhostimage.site.org -p 8080 Starting Nmap 6.40 ( http://nmap.org ) at 2015-07-29 16:23 CDT Nmap scan report for myhostimage.site.org (192.168.1.41) Host is up (0.00012s latency). PORT STATE SERVICE 8080/tcp closed http-proxy
What should I try next?