I have configure IIS webserver on Azure VM,when I tried to access the website using public IP from outside of the VM.
Website is not accessible,but same is accessible on Local VM.
Always throwing Can’t reach this page error from outside.
52.1.X.x took long to respond.
Error connection timed out error.
2
Answers
Try to perform the steps below might help fix the issue.
Open your VM resource on Azure, go to the Networking tab and add the ports your site is using. If you are using default ports, then add port 443 and 80.
In your Azure VM machine, open the firewall and allow the ports your site is using. If you are using default ports, then allow port 443 and 80.
In the IIS site binding, keep the IP address as unassigned.
Let us know your test results.
I tried to reproduce the same in my environment to access the website using public IP, As I got below error.
I have created windows Server 2019 VM, like below.
Azure Portal > Virtual machines > Create > Azure Virtual Machine
Configured IIS role on VM, like below.
Open Server Manager > Add roles and features > Roles Based or Featured based Installation > Select Server from pool > Web Server IIS > Install
Once Complete the IIS installation, Launch IIS Manager and test the web application.
Server Manager > Tools > IIS Manager > Expand your Server >Sites > Default web site
To resolve the issue, kindly create a Inbound rule in NSG for accessing website from outside of the VM.
Azure Virtual Machine > Select your VM > Networking > Inbound Rules > Add Inbound Rules
Web Application is accessible outside of the VM using public IP