Windows Server 2012 Hyper-V RDP from anywhere

desktoprdpremotewindows

I have a Windows Server 2012 R2 Datacenter installed with the Hyper-V manager activated.

Within the Hyper-V Manager I have installed two virtual machines. First virtual machine is a Windows Server 2012 R2 Standard, used as a domain controller. Second virtual machine is a Windows Server 2012 R2 Standard as well, used as the terminal server for remote desktop. Both are set up and have internet access.

I am able to connect to the internet and can remote to domain controller, terminal server within the network. However, outside the network, I am not able to connect. When I had a standalone Windows Server 2012 installation on a physical server without hyper-v and without virtual machines I used to install and use DynDNS.org and their DynDns updater software. Basically, I had my hostname setup with my ISP IP so I could use the hostname from anywhere and connect to the server via remote desktop. I made sure I have enabled also port forwarding for port 3389, that is all active.

I am not sure what the issue is. My best guess is a problem with the virtual switch or nat rules within Hyper-V.

Please advise me on how I can connect to the terminal server using my hostname e.g. myserver.dyndns.org.

Thanks @all

Best Answer

You will need to set a static IP. The virtual machine acts just like a physical machine on its static IP and can have a port forward setup on your router/firewall on port 3389 which will allow remote desktop connection. You also need to enable remote desktop connection in control panel > system > remote settings < allow connections from computers.

You can also follow this guide:

Firewall and DNS/IP with Hyper V