Allow Access to a VMware Virtual Machine(NAT) From Another Computer
If you are running a virtual machine on your computer, you may want to access that virtual machine from another computer. Let’s use an example: Say you have an Ubuntu virtual machine with Apache running on port 80, and you want to show other people on your network to access the website you are hosting.
We’re going to assume that the virtual machine is using NAT, and has been assigned an IP address of 192.168.23.128.
First open the Manage Virtual Networks start menu item:
Click on the NAT tab, and then click on Edit. You will see the NAT Settings dialog:
Click the Port Forwarding button, and you will see this dialog:
Now we are finally on a screen we can actually use. We’re going to use port 8080 on the host machine. We enter the ip address for the ubuntu virtual machine, and port 80. These ports could be any ports.
We should be able to test this out by going to http://localhost:8080 on our host pc. We can give out the url to our host machine by replacing localhost with the host computer IP address.

Daily Email Updates
You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Nice, thank you!
It works for me in the loopback interface in local machine only.
If my IP address is X.X.X.X I can access
http://localhost:8080
but no:
http://X.X.X.X:8080
Any idea?
I have the same problem
http://localhost:8080 works but http://x.x.x.x:8080 don’t work from other machines.
Well, I’d forgot to route the external network in the virtual machine.
Now it works. Sorry.
Please, can you give some indication of how do you do it?
Do you refer to the vmware NAT configuration or is necessary some other configuration?
Thanks in advance.
No. I don’t refer to the nat configuration in vmware
My guest system was a SCO Unix. I needed to add the routes (by using the route command) to my guest could see the externeal network.
Example: route add -network external_net -netmask external_mask nat_device_router
Hope it helps you.
I have it working now… but I can’t tell why it don’t work before (:
Thanks for the answer!!
Thank you very much. your little tutorial has helped me so much.
Good tutorial. Is there a way to access a webserver or ssh server running on a virtual machine from the internet (outside the local network)? I’d really love to see an indepth article about this.
I follow the above example and update the NAT thru vmcfg. However, when I try http://localhost:8080 on the host pc. It does not work. What did I miss ?
You should config firewall on ur host machine to open ports that NATed to the guest VM.
it’s very cool tips here which you mentioned here which i honestly say even i was not available in vmware forum. ok i did all this configuration step by step but still i cant access the webserver in my host browser!!?
in both , host & guest, the fire wall is off & maped the port for forwarding as mentioned above, & restart the vmware & still not working?(the vmware is in NAT connection mode)
i wish someone can help me bcz it’s being one week that i struggling with this problem
anybody there plz help me!!
I am able to access the Linux VM Guest from the host machine.But I couldn’t access this from any other machines on the LAN.
For Example : My virtual machine Ip is 192.168.79.32(NAT)
I could access this from my host machine : http://192.168.79.32:8005
But if I try the same from another machine on the lan I couldn’t.Even I couldn’t ping 192.168.79.32 from LAN.
Sudhakar,
I do not know what other machine OS you are using, but on windows hosts file located in DriveLetter-Windows-system32-drivers-etc. add this line
Xxx.Xxx.Xxx.Xxx VMmachinename
Change xxx to vm guest ip address and VMmachine name.
-Rehan
Hi
I setup up my port forwarding in vmware from host port 8080 to vm port 80 but like the others on this forum I could only connect to the guest vm using http://localhost:8080 and not 10.64.9.12:8080 on local host or over the network. I have my firewall turned off also.
Is there anything else that might block this? It seems my vmware is setup correctly but there is something else I am not doing.
Errol
Hi All the localhost ip on the machine itself is 127.0.0.1 its the loopback address. if you are trying to use ip for localhost you should use 127.0.0.1 or change this setting at DriveLetter-Windows-system32-drivers-etc as Rehan said and user host machine’s hostname.
Hope this helps.
i have got a virtual machine on a windowsserver 2003 platform…through vm editor i have done the port mapping with local host .but now iam not getting the webpage on local host it self by typing http:\\localhost:8080…help me out…