Expose Azure VM services publicly
Sometimes we required to expose service to access from public IP address essentially if the services are running on the virtual machine in Azure. In my case virtual machine was running a Windows 2016 server OS, it was my development machine, where I was developing some web applications. Here are the steps to allow some of the web applications running on virtual machine that need to access publicly.
First need login to your Azure portal, and go to that resource where the service is running, from the left side menu go to Networking tab like the below image –
Once you land on the Networking tab go to the “Add inbound port rule”, at the right side like the image below –
There we need to set new rules to connect to the VM services publicly
First rule source should be allow “Any” to anyone to connect from public domain same follow source port ranges. Destination for the VM can set here, setting for Destination port ranges is important, since my services in VM running on HTTP and the port is 80, so port 80 is open for external access. Protocol should set to TCP. We can set rule name in there which is not editable once set.
Now from any PC the service can be accessed using the VM IP address and the web page that is running on the VM. If the VM IP address is 20.20.20.20 and application URL is http://localhost/portal/login.asp, then you should be allowed to access like http://20.20.20.20/portal/login.asp.
Happy Exploring 🙂