How to open ports on Windows Azure VM

When you create a Linux virtual machine (VM) on Windows Azure, the VM will have only a port 22 open by default (for ssh). Apparently this setting is by design for security reasons. If you would like to open up additional ports, you can do so as needed, via Windows Azure management console.

To open ports on Windows Azure VM, go to Windows Azure management console. Click on "Virtual Machines", choose your VM, and click on "ENDPOINTS" link at the top. Click on "Add Endpoint", and fill in details: protocol (TCP/UDP), public port, and private port.

Add an Endpoint on Windows Azure VM

Public/private ports can be different if you are using Windows Azure Load Balancer. Otherwise, you can use the same private/private port numbers. When Load Balancer is used, traffic to public port is redirected to private port based on your configuration.

Note that Windows Azure does not allow ICMP traffic in and out of VMs from an external network's perspective. So you cannot ping Azure VM from an external host, or ping any external host from Azure VM. To verify connectivity or measure latency, you will need layer-3 measurement tools such as TCPing, and open up any necessary port(s).

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

Leave a comment

Your email address will not be published. Required fields are marked *