Accessing web server running on VM from external network

Hypervisor IP addr: 192.168.214.85 (external)
Hypervisor vmnet1 IP addr: 192.168.92.1
Hypervisor vmnet8 IP addr: 192.168.92.2
VM host IP addr: 192.168.92.11

Firstly, we need to configure port forwarding according to the following articles:

Configuring a Web server on a virtual machine that uses NAT mode networking (2006955)
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2006955

After checking firewall issues, I cannot figure out why I still didn’t get any response when accessing the URL:
http://192.168.214.85:8080.

At that time I checked apache access_log and executed tcpdump in guest host and it suddenly began to dawn on me that the guest host doesn’t have a default gateway. That’s exactly why the guest host cannot receive acknowledge packet from hypervisor! After setting the default gateway, the web server works perfectly.

Edit -> Virtual Network Editor -> VMnet8 -> NAT settings -> Gateway IP
Gateway IP : 192.168.92.2
VMWare Interfaces Tutorial

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s