How to change an Azure VM RDP public port number

Tonight I decided to connect to my Microsoft Windows Azure environment from a hotel to test a few things.  When I tried to connect via RDP I was unable to successfully connect. 

  • I signed into my Azure account.
  • I chose my VM.
  • I clicked connect.


  • I chose to open the RDP file.


  • I clicked connect at the security warning.


  • It hung for a while at connecting to.


  • Eventually I got the typical remote desktop can’t connect to the remote computer for one of these reasons error.  


  • This was odd as the VM is on and I had internet access.  I decided to look at the endpoints.  I noticed the public endpoint for RDP was an Azure typical high random public port number.  I wondered if there was something at this hotel that was blocking outbound access on that high port number. 


  • I decided to edit the RDP public port number by clicking edit.


  • I changed the port number to something lower(from 55220 to 20309).


  • Azure updating.


  • Azure updated.


  • Now the public RDP port number was a little lower. 


  • I went through the same steps to RDP to my Azure VM.
  • Connect


  • Open the RDP file.


  • Connect anyway in the security warning box.


  • It tried to connect on that lower port number.


  • It worked!



Sometimes you can’t control or even know about the environment you’re at but it’s always nice to know you can change some things in Azure to get around it. 

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s