ManOLeisure
Contributor
Contributor

Help with connection to VM using RDP from external network

Jump to solution

Having a problem that i cant work out. ill  try to describe it best as possible.

In another location to where i am, i have a Win7 Pc running Workstation 10, with a Server2012 VM.

Virtual network is setup as NAT (this is how i need it to be).

I can RDP from Win7 desktop to the Server2012 no problems..

What i am not able to setup is RDPing from my location here, through the router there using IP:PORT


Ive tried by setting up port forwards on the router to the VM but am unable to get it working.

Anyone know how to get this working?

1 Solution

Accepted Solutions
Bernd_Nowak
Hot Shot
Hot Shot

Have you allowed incoming trafic on port 44000 tcp on WIN7 PC? Incoming rules, any program, destination port 44000, protocol type TCP and source port any.

Important may be that the source port can be any. Check this on the ROUTER too.

Do you don't have a second PC in your LAN connected to the ROUTER? There you can test it and rule out the ROUTER config.

The "shoot port 44000" is part of the NAT function in the VMware Virtual Network. The important thing is that port 44000 tcp must be allowed in the WIN7 PC firewall.

I don't know for certain how good the NAT implemantation is but it should be even possible to run the following on the WIN7 PC cmd session:

mstsc /v:192.168.1.10:44000

In case you try to connect from a MAC client there is need for some more changes on the Windows Server 2012R2: Unable to connect to Windows 2012 R2 Preview from Remote Desktop for MAC 2.1.1

View solution in original post

0 Kudos
8 Replies
virtualdive
VMware Employee
VMware Employee

When you say you have done port forward, which IP did you use? Win7 or Server 2012? I also have a Lab setup at home and I connect to it from anywhere in the world without any problem through public IP.

Regards,

'V'
thevshish.blogspot.in
vExpert-2014-2021
0 Kudos
ManOLeisure
Contributor
Contributor

Hey, ive tried a few options.. ive been able to RDP using public IP to Win7 PC using port forward to that machine with no problems.. but to the VM i cant ever get it to work..

Ive set a port forward on the router for all incoming on port 3389 and sent it to the IP of the VM, and also the IP of the VM network router, and then setup a port forward in the NAT settings on Workstation but nothing is working.  setups is basically this:

Public IP

Local Network: 192.168.1.0 (router .1 and Win 7 Machine .10)

VM network: 192.168.190.0 (router .1 and Server2012 .100)

When i setup the Virtual Network to be Bridged then all is cool.. but setup as NAT as i need.. i seem to have issues getting the router to send the packets to the Virtual network.

Although from the Win7 Pc i can ping and RDP to the Server 2012 VM with no problems

0 Kudos
virtualdive
VMware Employee
VMware Employee

Okay. Why don't you connect through Bridge (replicate physical) option in the Workstation, it should work I guess. I never tried to connect the VM directly from outside though.

But to be honest, I would recommend to go through the Win7 instead of directly connecting to the VM because even if you connect, it may be very slow.

Thanks,

Regards,

'V'
thevshish.blogspot.in
vExpert-2014-2021
0 Kudos
ManOLeisure
Contributor
Contributor

Thanks for the reply.  I want to try and do it setup as NAT.. in bridge i have been able to connect successfully.

I have been connectiong to the Win7 machine and then to the Server, but it is actually ALOT slower that when i RDP directly to the VM (in bridged mode as it works)..  But to setup and test the virtual network correctly i want this in NAT

0 Kudos
Bernd_Nowak
Hot Shot
Hot Shot

If you use NAT you need several things. First choose a different port in your mind and check if it's free on the Windows 7 host. Then allow incoming connections to that port in the firewall ruleset of the windows 7 host.

Next is to use the virtual network editor and create a portforwarding rule so that any packet which comes in on that "new" and free port will be forwarded to the 2012 server rdp port, which can be still on the original port.

The 2012 server needs the default gateway and should be able to let's say reach outside resources.

On the router, which is connected to the internet, you need to portforward an rdp port to the windows 7 host added port. However if you have a vpn setup to your router you need no port forwarding on the router. The port forwarding on the router would expose the 2012 rdp port to the whole internet.

In case you want to use something with rpc over https the setup is different.

But this would be how I would set it up. You can test firewall and virtual network forwarding from another host in your internal lan.

ManOLeisure
Contributor
Contributor

Hey thanks for your input.. but what you are describing is exactly what i have already done.. and none of it works

Take a look and see if you can tell me whats wrong?

ROUTER      192.168.1.1

WIN7 PC      192.168.1.10   (this PC is running VMWare Workstation 10)

Ive chose port 44000 and on ROUTER i have created a Port Forward to 192.168.1.10

VMWare Workstation is setup in NAT. 

Virtual Network Gateway is  192.168.59.2

Win Server 2012 VM is  192.168.59.10 (static IP with its gateway 192.168.59.2)

In virtual Network editor i have setup a port forward from "host"port 44000 to port 3389 of 192.168.59.10

See anything wrong?

As the ROUTER cant see the Virtual Network (192.158.59.xxx)  i see some need for the Win 7 PC to somehow shoot port 44000 over to the Virtual Network.. Am i missing something?

Thanks in advance

0 Kudos
Bernd_Nowak
Hot Shot
Hot Shot

Have you allowed incoming trafic on port 44000 tcp on WIN7 PC? Incoming rules, any program, destination port 44000, protocol type TCP and source port any.

Important may be that the source port can be any. Check this on the ROUTER too.

Do you don't have a second PC in your LAN connected to the ROUTER? There you can test it and rule out the ROUTER config.

The "shoot port 44000" is part of the NAT function in the VMware Virtual Network. The important thing is that port 44000 tcp must be allowed in the WIN7 PC firewall.

I don't know for certain how good the NAT implemantation is but it should be even possible to run the following on the WIN7 PC cmd session:

mstsc /v:192.168.1.10:44000

In case you try to connect from a MAC client there is need for some more changes on the Windows Server 2012R2: Unable to connect to Windows 2012 R2 Preview from Remote Desktop for MAC 2.1.1

View solution in original post

0 Kudos
ManOLeisure
Contributor
Contributor

Hey, i have been able to get it working finally! Smiley Happy

Thanks for the assistance. Turned out being a firewall issue.. on the WIn 7 box i had already disabled the firewall but then realised that even with it disabled that it still blocks incoming connections, so i added the incoming port and all is working now.

0 Kudos