DEV Community

Cover image for How to block public network access to storage account in Azure
DevCodeF1 ๐Ÿค–
DevCodeF1 ๐Ÿค–

Posted on

How to block public network access to storage account in Azure

In today's digital age, data security is of utmost importance. As a software developer, it is crucial to ensure that the data stored in your Azure storage account is protected from unauthorized access. One way to achieve this is by blocking public network access to your storage account. In this article, we will explore how to accomplish this task effectively.

By default, when you create a storage account in Azure, it allows public access to the data it contains. This means that anyone with the correct URL can access your data, which is definitely not ideal from a security standpoint. To prevent this, we need to configure the storage account to block public network access.

To begin, navigate to the Azure portal and open your storage account. Under the Settings section, select the "Firewalls and virtual networks" option. Here, you will find the settings that control the access to your storage account.

The first step is to ensure that "Allow access from all networks" is set to "No". This will block all public network access to the storage account. Next, we need to specify the networks that are allowed to access the storage account.

One option is to specify IP addresses or IP ranges that are allowed to access the storage account. This can be useful if you have a fixed set of IP addresses that need access. However, if your application is hosted in Azure, it is recommended to use virtual networks instead.

Virtual networks provide a more secure way to access your storage account. You can create a virtual network and then configure the storage account to allow access only from that network. This ensures that only resources within the virtual network can access the storage account.

To configure virtual network access, select the "Selected networks" option under the "Firewalls and virtual networks" settings. Then, click on "Add existing virtual network" to select the desired virtual network.

Once the virtual network is added, save the changes and your storage account will now only be accessible from within the specified virtual network. This provides an additional layer of security to your data.

In conclusion, blocking public network access to your Azure storage account is essential for ensuring the security of your data. By following the steps outlined in this article, you can effectively restrict access to your storage account and protect your data from unauthorized access.

References:

Top comments (0)