using VMWare Player 5, how can I access a web server running in a VM via an external machine?
Asked Answered
T

3

12

Win7 PC running Rails in an Ubuntu VM via VMWare Player. I'm working on a site and would like to show it to a friend who's outside my network.

I found this blog post, which got me very close: http://blog.fardad.com/2012/06/vmware-player-and-custom-nat-port-map.html

OK, so I have the VM that is using NAT. As I understand it, that means that the VM will appear to have the same IP address as the parent machine to outside traffic.

I went into NAT settings and added port forwarding:

Host Port: 8200 Type: UDP Virtual IP Address: 192.168.198.184:3000 

OK so my understanding is that I should now be able to go to 192.168.1.1xx:8200 (the IP of my 'real' PC) and access the webserver running in the VM. But when I go to that address, I don't get anything. I can ping 192.168.198.184 (the VM) from the PC.

What I want to be able to do is go into my router and set up a port that will eventually forward into the VM.

It seems like I'm missing something very small but I don't know what that is. Help, please.


If anyone is curious how to get the Virtual Network Editor:

go to the vmware-directory and run in elevated cmd.exe-box

rundll32.exe vmnetui.dll VMNetUI_ShowStandalone

http://communities.vmware.com/message/2155960#2155960

Thetes answered 28/12, 2012 at 19:2 Comment(2)
Is port 8200 on your host machine's firewall open? Is there a reason why you don't simply set VMware to use bridged networking instead of NAT?Bankhead
It wasn't, but I opened it and nothing changed. I could use Bridged but it's all working (except this part) as is and I'm not sure I want to change it without good reason. My understanding is that this is possible with NAT. Do you think it'd be a lot easier with Bridged?Thetes
U
9
  1. Find the vmnetnat.conf file, usually located in

    C:\ProgramData\VMware\vmnetnat.conf
    

    or

    C:\Users\Application Data\VMware\vmnetnat.conf
    
  2. Edit vmnetnat, add similar line in the [incomingtcp] section

    8200=192.168.198.184:3000
    
  3. Restart VMware NAT Service.

Unheard answered 3/9, 2014 at 7:48 Comment(2)
These options are documented here: pubs.vmware.com/workstation-9/…Hylo
vmnetnat.conf does not existSennacherib
H
6

Try using Bridged network option in vmware player instead of NAT. It replicates your physical network.

Handkerchief answered 23/4, 2014 at 9:11 Comment(0)
H
1

You can use an http proxy to do that, by doing that you don't need to expose your entire private network, check out this blog post for more information how to access docker containers from external devices

Heads answered 3/5, 2015 at 18:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.