azureazure-storageazure-virtual-network

Azure Storage Account: File Access Denied while being connected to a VNet via P2S VPN


I am trying to access a file in the storage account via Azure Portal, while having public network access it set to: Enabled from selected virtual networks and IP addresses.

If i choose the current Virtual Network (including GatewaySubnet), that I am currently connected to via point-to-site Azure VPN Client, I still get the "This machine doesn't seem to have access. This storage account is located in a VNET."

Adding my IP address allows me to see the file. I also I was able to set up a private end point for that storage account, and use Private DNS Resolver with it and had no problem accessing the file.

But i really would like to enable access to the file for anyone on Azure Portal site who is currently connected to a VNet via VPN connection.

Enabled options: *

Based on the example videos (https://www.youtube.com/watch?v=LgIwl_El-SI), this should be working, but i am not sure why i am seeing the access denied message, any ideas ?

Thanks in advance.

enter image description here


Solution

  • Azure Storage Account: File Access Denied while being connected to a VNet via P2S VPN

    The reason you are not able to access Azure File Share via P2S VPN is due to a DNS issue.

    If you are not using a private endpoint and are only using a selected Virtual Network and IP to access the file share via P2S VPN, it will not connect. You may need to hardcode the storage endpoint IP and FQDN on your local machine, as the Azure Storage public IP can change frequently.

    enter image description here

    To resolve the issue, you can use a private endpoint and add a host entry on your local machine with the Private Endpoint IP and the Storage Endpoint.

    enter image description here

    10.0.0.5    venkatstoragetestdemo.file.core.windows.net
    

    When I tried to access the file share without a host entry, I also faced the same issue.

    enter image description here

    The issue was resolved after adding the host entry on the local machine.

    enter image description here

    Azure file share is accessible from P2S VPN

    enter image description here

    Reference: Tunneling traffic over a virtual private network or ExpressRoute

    Stack Link which is answered by me for same issue