Having spun up a few new Windows Azure VMs at home I was surprised to find that I was unable to RDP to them when I got to the office. The only explanation had to be that my organization’s firewall was blocking the RDP access. However I know that RDPing to other external VMs does work from the office so it had to be something specific in the way the azure VMs had been setup.

It turned out that the RDP ports (the port number doesn’t always appear to be exactly the same) that Azure VMs are configured to use by default are in a range that is typically blocked by many corporate networks. You have a few options here… You might want to talk to your network administrator about unblocking certain ports if they agree to do so or override the port number chosen by Azure with one suggested by them (I would definitely recommend one of these options if the Azure VMs in question are used to host enterprise application components).  In my case I was using the Azure VM as a personal training sandbox machine only and I wasn’t too concerned about using the default RDP port for external RDP connections as well so I decided to change my Azure VMs external RDP port to the default RDP port number.

If you want to change the port associated with external RDP connections then you will need to log into the Azure management portal, browse to virtual machines and click on the name of the VM in question (don’t just click anywhere on the row, you specifically want to click on the name). Next you will want to browse to the Endpoints tab, highlight the RemoteDesktop option and click edit at the bottom of the screen.


You will want to change the value for the public port appropriately and apply the change by clicking on the tick icon. You will have to wait until the change has completed applying, this might take a minute.

Remote desktop

Once that is done you will need to re-download your RDP connection file or edit your existing one to use the new port number (if you used port 3389 then you won’t need to specify the port number).