Efficient and Secure File Sharing for Geographically Dispersed Offices with Restricted Network Access on Azure

Raphael Olaniyi - May 28 - - Dev Community

The company operates in multiple locations and requires an efficient method for file sharing and information dissemination across its offices. For instance, the Finance department needs reliable access to confirm cost information for auditing and compliance purposes. These file shares must be easily accessible and load quickly, with certain content restricted to selected corporate virtual networks.

Our goals are as follows:

  • Create a storage account specifically for file shares.
  • Configure a file share and directory.
  • Set up snapshots and practice restoring files.
  • Restrict access to a specific virtual network and subnet.

Create and configure a storage account for Azure Files.
Create a storage account for the finance department’s shared files. Learn more about storage accounts for Azure Files deployments.

In the portal, search for and select Storage accounts.
select Storage accounts
Select + Create.
Select + Create

For Resource group select Create new. Give your resource group a name and select OK to save your changes.
select Create new

Provide a Storage account name. Ensure the name meets the naming requirements.
Storage account name

Set the Performance to Premium.
Set the Performance to Premium

Set the Premium account type to File shares.
File shares

Set the Redundancy to Zone-redundant storage.
Zone-redundant storage

Select Review and then Create the storage account.
Select Review and then Create

Wait for the resource to deploy.
Select Go to resource.
Go to resource

Create and configure a file share with directory.
Create a file share for the corporate office. Learn more about Azure File tiers.

In the storage account, in the Data storage section, select the File shares blade.
File shares blade

Select + File share and provide a Name.

Select + File share
provide a Name

Review the other options, but take the defaults.
Review
Select Create
Select Create

Add a directory to the file share for the finance department. For future testing, upload a file.

Select your file share and select + Add directory.
select + Add directory

Name the new directory finance.
new directory finance

Select Browse and then select the finance directory.
Select Browse
finance directory.

Notice you can Add directory to further organize your file share.
Upload a file of your choosing.
Upload a file of your choosing

Configure and test snapshots.
Similar to blob storage, you need to protect against accidental deletion of files. You decide to use snapshots.

Select your file share.
In the Operations section, select the Snapshots blade.
Snapshots blade

Select + Add snapshot. The comment is optional. Select OK.
Select + Add snapshot

Select your snapshot and verify your file directory and uploaded file are included.
verify your file directory

Practice using snapshots to restore a file.

Return to your file share.
Browse to your file directory.
Browse to your file directory

Locate your uploaded file and in the Properties pane select Delete. Select Yes to confirm the deletion.
select Delete

Select the Snapshots blade and then select your snapshot.
Snapshots blade
select your snapshot

Navigate to the file you want to restore,
file you want to restore

Select the file and the select Restore.
select Restore

Provide a Restored file name.
Restored file name

Verify your file directory has the restored file.
Browse file share
File has been restored
File has been restored

Configure restricting storage access to selected virtual networks.
This tasks in this section require a virtual network with subnet. In a production environment these resources would already be created.

Search for and select Virtual networks.
select Virtual networks

Select Create. Select your resource group. and give the virtual network a name.
Select Create
virtual network a name

Take the defaults for other parameters, select Review + create, and then Create.
select Review + create
 Create

Wait for the resource to deploy.
Select Go to resource.
Go to resource

In the Settings section, select the Subnets blade.
Subnets blade

Select the default subnet.
default subnet

In the Service endpoints section choose Microsoft.Storage in the Services drop-down.
Microsoft.Storage

Do not make any other changes.
Be sure to Save your changes.
Save your changes

The storage account should only be accessed from the virtual network you just created.

Return to your files storage account.
In the Security + networking section, select the Networking blade.
 Networking blade.

Change the Public network access to Enabled from selected virtual networks and IP addresses.
Enabled from selected virtual networks and IP addresses

In the Virtual networks section, select Add existing virtual network.
Add existing virtual network

Select your virtual network and subnet, select Add.
Select your virtual network and subnet

Be sure to Save your changes.
Save your changes

Select the Storage browser and navigate to your file share.
Select the Storage browser

Verify the message not authorized to perform this operation. You are not connecting from the virtual network.
Verify the message not authorized to perform this operation

. . . . . . . . . . .