-2

I have a number of Windows VM's running on a Windows Hyper-V host (Windows Server 2016) and I need to be able to access the guests via RDP across the Internet but do not want to have to give them all a public IP address. The host has a public facing IP address and I can access the host via RDP no problem via the default port 3389.

What I'd like to do is NAT ports to the guest VM's to be able to access them via the hosts public IP address plus a port number and then NAT that port number to the guest VM.

So for example:

Host Public IP address is (for example) 8.8.8.8 and VM1 has private IP address 172.26.0.1

I'd like to NAT 8.8.8.8:3390 to 172.26.0.1:3389 then 8.8.8.8:3391 to 172.26.0.2:3389 etc...

To give the VM's internet access I have shared the hosts network adaptor and created a virtual switch which I've enabled on each VM and they can reach the internet but of course there is no route back to them (for the RDP session).(

Could someone kindly point me in the right direction to accomplish this?

Thanks.

omega1
  • 416
  • 3
  • 9
  • 29
  • 3
    And you are not aware of what a VPN des? (VPN up, then establish RDP over it) or what the RDP gateway role does (which is an RDP application server that you can connect THROUGH into a backend)? Sorry, but we do not really do "I am not learning my stuff, please rtfm for me" here - that is superuser.com – TomTom Sep 26 '22 at 17:36
  • 1
    Look into using RD Gateway - https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/rds-plan-access-from-anywhere – joeqwerty Sep 26 '22 at 19:49

1 Answers1

-1

I was able to solve this following a couple of guides...

This one explains how to set up a NAT switch https://charbelnemnom.com/how-to-configure-hyper-v-virtual-switch-that-supports-nat-network-with-powershell-hyperv-powershell/

And this one which explains how to set up port forwarding on the above NAT Switch https://petri.com/create-nat-rules-hyper-v-nat-virtual-switch/

omega1
  • 416
  • 3
  • 9
  • 29