简体   繁体   中英

RDP from external PC to Hyper-V guest VM

I have a problem configuring RDP. This is the situation:

PC1 (host): Windows 10 Pro with Hyper-V
The guest-VM is Windows 10 Enterprise

I also have another PC in the WLAN, a FritzBox router and an external PC in the internet.

The routers external IP is mapped through dynDNS.

On the router I have forwarded TCP port 3389 to the host PC1.

Host PC1 has one active WLAN adapter. It has a 2nd LAN adapter that is not connected and disabled.

The guest VM has internet access through the default internal switch of Hyper-V, that is not configurable an uses the WLAN adapter. The WLAN adapter is configured for shared connections. A second (external) switch can't be configured with Hyper-V, as the only active adapter is already used by the default switch.

All systems have RDP enabled, port 3389 open, and network discovery enabled. They all belong to WORKGROUP. A domain is not configured.

I can open the following RDP sessions:

from host PC1 to the guest VM
from PC2 to PC1
from the external PC via internet to PC1

What doesn't work and what I need to configure:

from WLAN PC2 to VM guest on PC1
and, most importantly:
from external PC to VM guest system in PC1.

What is wrong or missing?

Solved:

  1. Choose a port number (10000) an verify that it is not used on the host PC1:

    netstat -anp TCP

  2. Open incoming port 10000 in firewall on PC1

  3. Forward incoming traffic on host WLAN adapter 192.168.0.29:10000 to internal IP 192.168.162.151 of virtual adapter of the VM

    netsh interface portproxy add v4tov4 listenaddress=192.168.0.29 listenport=10000 connectaddress=192.168.162.151 connectport=3389

  4. Configure (FritzBox) router to forward incoming traffic for port 10000 to the host 192.168.0.29:10000

Now I can connect on host:10000 directly with RDP to the VM

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM