question

parisbertoni avatar image
0 Votes"
parisbertoni asked ·

Unable to access my public IP using port 80

I have a VM on Azure running Windows Server and IIS. I have also set up a couple of websites that work fine within the VM.
I'm trying to access a website binded to port 80 using the public IP set up, nevertheless, I can't make it work.
So far, I've done the following:
- Allow port 80 in NSG
- Associated NSG to my subnet
- Open port 80 in Windows Server Firewall (right now, I have the firewall off completely just in the meantime I find the solution)

Could somebody shade some light on this problem?
Thanks!

3841-firewall.png
3744-nsg.png
3734-website.png
3753-bm3.png


azure-virtual-machines
firewall.png (20.8 KiB)
nsg.png (55.1 KiB)
website.png (20.5 KiB)
bm3.png (28.9 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

parisbertoni avatar image
0 Votes"
parisbertoni answered ·

Thanks to @msrini-MSFT, I've figured it out that the Azure VM was not set up to listen to the private IP.
The solution, in this particular case, was to run the following command:

netsh http add iplisten 10.0.5.4

Hope it helps!

· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please mark the response as answered to help other community members

3 Votes 3 ·

Worked for me! Thanks!

0 Votes 0 ·
msrini-MSFT avatar image
1 Vote"
msrini-MSFT answered ·

Can you please share the netstat-ano output from your cmd prompt of the Web server? Also , I checked from my end to the IP which you have shared, it works fine with port 3389. I can say that the port 80 is not blocked by the platform.


· 13 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi msrini-MSFT, please find attached the file requested.
It's right, I have remote access using port 3389
I can even ping port 80
Nevertheless, when browsing http://bm3testing.westus2.cloudapp.azure.com:80 or http://bm3testing.westus2.cloudapp.azure.com:8082 (I have both websites exposed in IIS), nothing happens.
Thanks.

3852-netstat.txt


0 Votes 0 ·
netstat.txt (8.6 KiB)

The private IP which you mentioned in the screenshot and the IP in the netstat output doesn't match. Are you looking at the wrong machine with the same name ?

0 Votes 0 ·

I'm afraid I don't follow. My private IP is 10.0.5.4 according to Azure screenshot configuration.
What should I do?

0 Votes 0 ·
Show more comments

I think I captured my local PC netstat mistakenly when switching to the VM. Here is the netstat file verified with the right IP.3961-netstat2.txt


0 Votes 0 ·
netstat2.txt (9.0 KiB)

Seems like the web server is listening on port 80 of the IPv6 address. I cannot see port 80 on local address 0.0.0.0:80.

1 Vote 1 ·

How can I fix it, please?

0 Votes 0 ·

]Here's my subnet configuration. As you can appreciate, the NSG is bind with all ports open.
How can you tell IPv6 is the protocol listening and not IPv4. Whatismost, could you please tell me how to fix it?
Thank you!

3971-subnet.png

3952-nsgsubnet.png


0 Votes 0 ·
subnet.png (41.7 KiB)
nsgsubnet.png (78.1 KiB)
Show more comments