0

After creating a VM on Azure, I need to use a VPN in order to RDP to it. This is because of my Internet Service Provider's networking regulations. Therefore I have to change the RPD port from within the VM every time I create a new VM. Is there a way I can make the default RDP port number (ex: 8000) using Azure templates?

1 Answers1

0

You can't make this change in an ARM template directly, as the port RDP listens on is an OS configuration rather than something at the VM level. There are a couple of things you can do:

  1. Use PowerShell DSC, or a custom PS script to change this. Have your ARM template call this script or DSC using the DSC or custom script extension.
  2. Setup the VM's behind a load balancer, which you can configure in an ARM template. Create NAT rules in the load balancer to forward your required port to the RDP port on the VM
Sam Cogan
  • 38,158
  • 6
  • 77
  • 113