The following forum(s) have migrated to Microsoft Q&A (Preview): Azure Virtual Machines!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
how to open port and get ip RRS feed

  • Question

  • I've installed ubuntu vm. I want to run on it a small http server (node.js).

    how can I open a port? How do I know which ip to use?

    so far the ip I see in the admin portal does not appear in ifconfig and does not seem to work.

    also I'm not sure what't the appropriate way to open ports. is "ufw allow" enough or do I need to open something in azure?


    http://webservices20.blogspot.com/
    WCF Security, Interoperability And Performance Blog


    • Edited by Yaron Naveh Wednesday, July 11, 2012 7:06 PM
    Wednesday, July 11, 2012 6:44 PM

Answers

  • Hi Yaron,

    The IP returned by ifconfig in the VM is the dynamic IP (DIP). It is the internal IP that is not directly exposed to the internet. The IP on the portal is the virtual IP (VIP) which is external.

    For Linux VMs, only a single endpoint is opened by default - port 22 for SSH. You can open additional ports by going to the Endpoints tab and clicking Add Endpoint. So ports need to be opened as an endpoint in Azure, and also in the guest OS firewall. See also How to Set Up Communication with a Virtual Machine

    Thanks,
    Craig

    Wednesday, July 11, 2012 9:09 PM