Unable to access a particular website inside the Azure VM.

Darshan-S 10 Reputation points
2023-10-17T04:31:53.3233333+00:00

Error

Hello, this is our company website finvatech.com. We are unable to access it inside the Azure VM. I've added 80 and 443 NSG- inbound rule in azure portal. It did not work. Getting the IIS Windows Server message. Please advise!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,041 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Ali AlEnezi 1,081 Reputation points
    2023-10-17T04:47:46.9333333+00:00

    Hi Darshan,

    I'm sorry to hear about the difficulty you're facing. Let's troubleshoot step by step:

    NSG Rules:

    • Ensure that your Network Security Group (NSG) rules are correctly associated with either the subnet or the Network Interface Card (NIC) tied to your VM.
    • Confirm that the priority of the NSG rules for ports 80 and 443 isn't being overridden by another rule with a higher priority (lower number indicates higher priority).
    • While adding inbound rules allows incoming traffic, you also need to ensure that outbound rules allow traffic to the internet or the specific domain.

    Virtual Network Configuration:

    • If your VM is inside a Virtual Network (VNet), ensure there's no NSG at the subnet or VNet level blocking outgoing traffic to the internet or the specific website.
    • Ensure that the VM's VNet has a proper route to the internet. By default, Azure provides a system route for 0.0.0.0/0 that points to the 'Internet' next hop type. If you have custom route tables, ensure they're not obstructing the default behavior.

    VM Firewall:

    • Windows VM: Inside the VM, check the Windows Firewall settings. Ensure that it's not blocking outgoing requests to ports 80 and 443.
    • Linux VM: If it's a Linux-based VM, check any active firewalls (e.g., UFW, firewalld) to ensure they're not blocking the required ports.

    DNS Resolution:

    • Check if the VM can resolve the domain name. Use commands like nslookup finvatech.com or ping finvatech.com.
    • If the VM can't resolve the domain, ensure that it's using a functional DNS server. By default, Azure VMs use Azure's DNS services, but if you've customized DNS settings, this could be a potential area of concern.

    Host File:

    • For Windows VMs, check C:\Windows\System32\drivers\etc\hosts and for Linux VMs, check /etc/hosts to see if there are any manual entries for finvatech.com that might be causing an issue.

    Browser/HTTP Client:

    • If you're using a web browser to access the website, try using a different browser or a simple HTTP client like curl (on Linux) to rule out browser-specific issues.

    Testing from Another Network:

    • Try accessing finvatech.com from another VM or machine outside of Azure to determine if the issue is Azure-specific or a broader issue with the website's accessibility.

    Application Gateway/Web Application Firewall (WAF):

    • If you have Azure Application Gateway or any other Web Application Firewall (WAF) in place, ensure it's not blocking access to the domain.

    After running through these steps, you should hopefully either identify the issue or narrow down the potential causes.


  2. kobulloc-MSFT 26,811 Reputation points Microsoft Employee Moderator
    2023-10-20T18:25:16.3266667+00:00

    Hello, @Darshan-S ! We received your feedback and we'd like to help get you back on track.

    Why am I getting the default IIS Server page when accessing a specific website from my VM?

    In this case, I was able to access finvatech.com from my test Windows 10 VM without any issues:

    User's image

    What's interesting in your screenshot is that it looks like you are reaching the webserver, but the webserver is returning the default IIS Server page and only to this VM.

    Caching might explain this but you mentioned that you tried multiple browsers so a quick Ctrl + F5 might be useful just to make sure we aren't overlooking anything.

    It's possible that there is a configuration issue with the web server that needs to be addressed however the scope of this impact seems to be limited.

    The solution here may be as simple as recreating/redeploying your VM to remove any stale or corrupted configuration values (I used default deployment for my test VM). If you are able to reliably get the default IIS page then you may need to adjust the web server configuration (default document, etc.).


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments

  3. msrini-MSFT 9,291 Reputation points Microsoft Employee
    2023-10-23T21:38:31.11+00:00

    Hi,

    It could be due to the possible cause:

    1. Can you check if you have a DNS record where the domain name finvatech.com points to your VM's private IP ? If not, can you check the hostname file to see if you added this entry ?
    2. Also, I think you should have installed IIS on your local VM from where you are trying to access and it responds with this default IIS page. If you are not using it, you can remove the site.

    Regards,

    Karthik Srinivas

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.