Subscribe to How-To Geek

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.

The Geek is the founder of How-To Geek and a geek enthusiast. This article was written on 12/7/06 and tagged with: VMware

Daily Email Updates

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


Name:
Email:
Similar Articles Featured Wiki Articles
Latest Software Reviews Quick Linux Tips
Geek Arcade Popular Forum Threads

Comments (14)

  1. Scrooge

    Nice, thank you!

  2. JC

    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?

  3. Dani

    I have the same problem
    http://localhost:8080 works but http://x.x.x.x:8080 don’t work from other machines.

  4. JC

    Well, I’d forgot to route the external network in the virtual machine.

    Now it works. Sorry.

  5. Dani

    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.

  6. JC

    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.

  7. Dani

    I have it working now… but I can’t tell why it don’t work before (:
    Thanks for the answer!!

  8. tyliong

    Thank you very much. your little tutorial has helped me so much.

  9. jonw

    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.

  10. GK

    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 ?

  11. Nima

    You should config firewall on ur host machine to open ports that NATed to the guest VM.

  12. shopank

    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 :)

  13. shopank

    anybody there plz help me!!

  14. sudhakar Mani

    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.


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.