I have a VM running linux in Microsoft Azure cloud,

The VM is under Azure Virtual network and has a private IP and a public IP

I wish to open all the ports (disable the firewall) for the VM only in the private network,

Every Documentation regarding this issues in linux VM on Azure has pointed me to allowing endpoints, but i dont want to VM to be accessed from the internet , just the private network

What should i do ?


  • Why downgrade for ? – Matan L Jul 7 '13 at 18:27
  • are you looking to just disable the firewall inside the VM? or does Azure provide an external firewall that you need to modify? If just on the linux side, you need to just permit all on the internal interface. How that is done depends on which version of linux you are using though. – Doon Jul 7 '13 at 18:31
  • Ubuntu SMP x86_64 GNU/Linux - Distributor ID: Ubuntu Description: Ubuntu 12.04.1 LTS Release: 12.04 – Matan L Jul 7 '13 at 22:04

Endpoints in Virtual Machines are only used with external access - that is, either from somewhere outside of Windows Azure, or from another cloud service where you're connecting via the public ip address / dns name.

For virtual machines within a single deployment, you can access whatever ports you want. This is limited only by your virtual machine's firewall / iptable settings. Note: This differs from web/worker cloud services, where you must define internal endpoints for inter-role communication.

You can also connect two virtual machine deployments with a Virtual Network. You'll then have the same full port access between machines, limited only by firewall rules.

One more thing to note: with external endpoints, you can limit these to specific ip ranges allowed / blocked, providing additional security. See Michael Washam's post about this. Currently this feature is only available via PowerShell.



  1. You are using UFW
  2. eth1 is your internal network interface.

something like sudo ufw allow in on eth1 should work. assuming your default policy isn't to deny outgoing

Not the answer you're looking for? Browse other questions tagged or ask your own question.