Cannot access websites hosted on Azure VM through VPN

Michael Torbett 0 Reputation points
2025-01-28T21:22:25.8266667+00:00

I have an Azure virtual machine hosting public facing websites that I can access fine on and off network. However, when I login to VPN, those sites are no longer accessible (this website can't be reached). I feel confident that DNS is configured correctly and I cannot see any inbound/outbound rules in the network security group causing this. However I'm not a networking expert. How would I create an inbound/outbound rule to allow vpn access (VPN IP Address: 999.999.999.99) to my websites?

Any other ideas what might be the cause of this issue.

Thank you for your help.

Michael

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,612 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VIVEK DWIVEDI 105 Reputation points Microsoft Employee
    2025-01-30T03:19:32.5333333+00:00

    Hi @Michael Torbett ,

    Greetings!
    Adding a few points.

    1. You don't have to create outbound NSG rule for this scenario. Only NSG inbound rule should suffice your requirement.
    2. There could be a few possible causes here:
      a. To verify NSG is not an issue, create an inbound rule as suggested by Ganesh in above comment and keep the source IP as Any (0.0.0.0/0) and destination port as Any (*) Protocol as TCP. Sometimes doing this is not possible if there is a policy that restricts you from allowing the traffic in that case, connect to VPN first. Check what is your public IP and then whitelist it in NSG rule.
      Also ensure that this rule has priority 100 and should be above of any deny rule.

    b. You can utilize Azure network watcher to check if there is any traffic blocked in Azure.
    https://learn.microsoft.com/en-us/azure/network-watcher/connection-troubleshoot-overview
    https://learn.microsoft.com/en-us/azure/network-watcher/ip-flow-verify-overview

    c. Check the firewall status at the OS level where site is hosted. Try whitelisting the IP address or disabling OS firewall for testing.

    d. Possibly your VPN brings any kind of proxy which doesn't have the website allowed. Or VPN is not able to resolve the DNS name of the website. Please post the error screenshot in that case.

    I hope this helps.


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.