Home > front end >  IIS Webserver is not accessible through Public IP
IIS Webserver is not accessible through Public IP

Time:12-20

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.

CodePudding user response:

Try to perform the steps below might help fix the issue.

  1. 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.

  2. 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.

  3. In the IIS site binding, keep the IP address as unassigned.

Let us know your test results.

CodePudding user response:

I tried to reproduce the same in my environment to access the website using public IP, As I got below error.

enter image description here

I have created windows Server 2019 VM, like below.

Azure Portal > Virtual machines > Create > Azure Virtual Machine

enter image description here

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

enter image description here

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

enter image description here

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

**Inbound Rule:** 
Source: Any (for test)
Source Port Range: *(for test)
Destination: Any
Service: Custom
Destination Port Ranges: 80,443
Protocol: Any.
Action: Allow
Priority: 100 (Keep it first priority)
Name: AllowInboundPorts

enter image description here

Web Application is accessible outside of the VM using public IP

enter image description here

  • Related