Hello PC,
Greetings! Welcome to Microsoft Q&A Platform.
To connect to your Azure Storage Account File share using Azure VPN, you can use a point-to-site (P2S) VPN connection to mount your Azure file shares over SMB from outside of Azure, without opening up port 445. A point-to-site VPN connection is a VPN connection between Azure and an individual client. To use a P2S VPN connection with Azure Files, you must configure a VPN connection for each client that wants to connect. If you have many clients that need to connect to your Azure file shares from your on-premises network, you can use a site-to-site (S2S) VPN connection instead of a point-to-site connection for each client.
By default, the Azure File Share is still accessible via its public IP address. To prevent access from the internet to the file share's public address you have to add storage firewall/network security rule settings to the share, which limits the networks from which access is permitted.
After restricting access from all networks (including the internet) you then have to explicitly allow access to the storage resource from subnets within your VNET or from listed public IP addresses.
P2S VPN clients are assigned addresses within a leasepool subnet range defined when you create the virtual network gateway. This subnet does not have a subnet ID - it is separate to VNET subnets
example - Azure P2S VPN is part of VNET-A which is peered to VNET-B. The Storage account has a private endpoint for each of Blob and File storage, the ip addresses of which are part of a subnet in VNET-B. Network Access is enabled for all the subnets in only VNET-A and VNET-B.
to create a file share and access it from the desktop, you need to create and configure a Private End Point under the subnet you have the storage account exists. Go to 'Private Endpoint Connection' under settings of storage account in azure portal,
Next create it as shown in the below figure. Remember to select the options as shown:
Follow the steps and select the subnet created in earlier steps. Once the creation is completed, note the Network interface IP address from the summary page. This the IP address which you can connect through your P2S network
When you map the drive, use the folder format as \Private IP Address\Filesharename Note: Here you need to use the file share name instead of storage account name
refer - https://learn.microsoft.com/en-us/azure/storage/files/storage-files-configure-p2s-vpn-windows?tabs=azure-portal, https://medium.com/@danieluqpierce/how-to-access-azure-file-share-over-vpn-0db78ed482e7
Similar thread for reference - https://learn.microsoft.com/en-us/answers/questions/741817/connect-on-prem-to-azure-files
Hope this helps! Please let us know if you have any further queries. I’m happy to assist you further.
Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.