question

ptadmin-1818 avatar image
0 Votes"
ptadmin-1818 asked ManuPhilip commented

Cannot connect to Azure File Shares from Azure VPN

I am trying to map network drives to Azure file shares I uploaded. I can use the path provided and get the UAC prompt but, after putting in the credentials, I get a "network path not found" error. I can neither ping any of the public IPs listed for my vnet. I am connected through a Virtual Network Gateway using a P2S I created and all resources are located under the same vnet. Any advice on what is going on? Thanks.

azure-storage-accountsazure-virtual-network
5 |1600 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.

ManuPhilip avatar image
0 Votes"
ManuPhilip answered

Hello,
I have explained step-by-step procedure to map Azure File Share as local drive in my blog

use-an-azure-file-share-with-windows



Please check, if you are following the same strategy for mapping the drive

Thanks,
Manu

5 |1600 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.

ptadmin-1818 avatar image
0 Votes"
ptadmin-1818 answered

It did not work. The command you provided failed to run due to positional parameters that cannot be found.

5 |1600 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.

ManuPhilip avatar image
0 Votes"
ManuPhilip answered ManuPhilip edited

Hello,
Sorry to see that you are still experiencing some issues. I am putting all the steps together as below. The steps will work as I tested now.

  1. Create a azure resource group. Change name and location as preferred

    New-AzResourceGroup -Name manazrg -Location southindia

  2. Create the new storage account. Change the resource group name, use your preferred storage group name, location. I have selected the SKU - Standard_LRS

    New-AzStorageAccount -ResourceGroupName manazrg -Name manuazsg -Location southindia -SkuName Standard_LRS

  3. Find the secret key. Change the resource group name, storage group name. Copy any one of the key

    Get-AzStorageAccountKey -ResourceGroupName “manazrg” -AccountName manuazsg

  4. Substitute the key in the following cmdlet to create the required share. Change resource group name, any one of the key key

    $azShare = New-AzStorageContext “manazsg” “your key here”

  5. Create share. Use your preferred share name

    New-AzStorageShare manaznetshare -Context $azShare

  6. From windows explorer, click ‘Map Network Drive’. Substitute, your storage groupname, share name below:

Share name: \\manazsg.file.core.windows.net\manaznetshare

Username, Password:
AZURE\<storage account name> and Password is your key copied in step 3

  1. This will bring up the share in your windows explorer :)

Regards,
Manu

5 |1600 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.

StephaneBudo-1973 avatar image
0 Votes"
StephaneBudo-1973 answered

Hi,

I'm a little confused on the architecture of the solution:
You mentioned you are connecting to a VNet in Azure with a P2S connection. Is this to connect to existing virtual machines?
The Azure File Share is part of the storage offering which is a public service. This mean that the access will be done through a public IP, so there is no need for VPN.
Or did you create an endpoint within the VNet for the storage account and are trying to map the drives from your VMs located on your VNet?
For troubleshooting purposes, have you tried to connect directly to the file share from your local computer (outside of Azure) through a simple internet connection?

Thank you,
Stephane

5 |1600 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.

ptadmin-1818 avatar image
0 Votes"
ptadmin-1818 answered ManuPhilip commented

Hello,

I found a YouTube video which explained why I could not connect. There were some ways I needed to adjust the VPN on the client so it could communicate with the VPN and private endpoint I created. Thanks anyway.

· 2
5 |1600 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 @ptadmin-1818 could you share the link to that video please?

0 Votes 0 ·

Here is the blog I created on the same topic - use-an-azure-file-share-with-windows


0 Votes 0 ·
richardwolford-7948 avatar image
0 Votes"
richardwolford-7948 answered

Hello, I don't mean to do any sort of thread necromancy, but I'm having similar issues. I have two vnets which are peered. My users connect via P2S to the gateway, no problems there. I've set the file share to only accept connections from selected networks and I selected all networks and all subnets. However my users, once connected to the VPN, cannot access the files via a UNC path. The VMs in Azure have no proble doing so. If I open up to allow connections from any network, my users can connect to the file share over the Internet. Any idea what might be going on here? I have no private endpoints created.

5 |1600 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.