You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Private endpoint is the fundamental building block for Private Link in Azure. It enables Azure resources, like virtual machines (VMs), to privately and securely communicate with Private Link resources such as Azure Storage.
16
16
17
-
In this tutorial, you'll learn how to:
17
+
:::image type="content" source="./media/tutorial-private-endpoint-storage/storage-tutorial-resources.png" alt-text="Diagram of resources created in tutorial.":::
18
+
19
+
In this tutorial, you learn how to:
18
20
19
21
> [!div class="checklist"]
20
22
> * Create a virtual network and bastion host.
23
+
> * Create a storage account and disable public access.
24
+
> * Create a private endpoint for the storage account.
21
25
> * Create a virtual machine.
22
-
> * Create a storage account with a private endpoint.
23
26
> * Test connectivity to the storage account private endpoint.
24
27
25
28
## Prerequisites
26
29
27
30
* An Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
28
31
29
-
## Sign in to Azure
32
+
## <aname="create-storage-account-with-a-private-endpoint"></a> Sign in to Azure
30
33
31
34
Sign in to the [Azure portal](https://portal.azure.com).
32
35
33
-
## Create a virtual network and bastion host
34
-
35
-
Create a virtual network, subnet, and bastion host. The virtual network and subnet will contain the private endpoint that connects to the Azure Storage Account.
36
-
37
-
The bastion host will be used to connect securely to the virtual machine for testing the private endpoint.
3. In **Create virtual network**, enter or select this information in the **Basics** tab:
42
+
Before you create the private endpoint, it's recommended to disable public access to the storage account. Use the following steps to disable public access to the storage account.
| Network policy for private endpoints | Select **edit** to apply Network policy for private endpoints. </br> In **Edit subnet network policy**, select the checkbox next to **Network security groups** and **Route Tables** in the **Network policies setting for all private endpoints in this subnet** pull-down. </br> Select **Save**. </br></br>For more information, see [Manage network policies for private endpoints](disable-private-endpoint-network-policy.md)|
87
94
88
-
It will take a few minutes for the virtual network and Azure Bastion host to deploy. Proceed to the next steps when the virtual network is created.
95
+
# [**Dynamic IP**](#tab/dynamic-ip)
89
96
90
-
## Create a virtual machine
97
+
| Setting | Value |
98
+
| ------- | ----- |
99
+
|**Private IP configuration**| Select **Dynamically allocate IP address**. |
91
100
92
-
In this section, you'll create a virtual machine that will be used to test the private endpoint.
101
+
:::image type="content" source="./media/create-private-endpoint-portal/dynamic-ip-address.png" alt-text="Screenshot of dynamic IP address selection." border="true":::
93
102
94
-
1. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines** in the search results.
:::image type="content" source="./media/create-private-endpoint-portal/static-ip-address.png" alt-text="Screenshot of static IP address selection." border="true":::
137
112
138
-
## Create storage account with a private endpoint
113
+
---
139
114
140
-
Create a storage account and configure the private endpoint. The private endpoint uses a network interface assigned an IP address in the virtual network you created previously.
115
+
1. Select **Next: DNS**.
141
116
142
-
1. In the search box at the top of the portal, enter **Storage account**. Select **Storage accounts** in the search results.
143
-
144
-
2. Select **+ Create**.
145
-
146
-
3. In the **Basics** tab of **Create a storage account** enter or select the following information:
The storage access key is required for the later steps. You'll go to the storage account you created previously and copy the connection string with the access key for the storage account.
125
+
The storage access key is required for the later steps. Go to the storage account you created previously and copy the connection string with the access key for the storage account.
190
126
191
127
1. In the search box at the top of the portal, enter **Storage account**. Select **Storage accounts** in the search results.
192
128
193
-
2. Select the storage account you created in the previous steps.
129
+
1. Select the storage account you created in the previous steps or your existing storage account.
194
130
195
-
3. In the **Security + networking** section of the storage account, select **Access keys**.
131
+
1. In the **Security + networking** section of the storage account, select **Access keys**.
196
132
197
-
4. Select **Show**, then select copy on the **Connection string** for **key1**.
133
+
1. Select **Show**, then select copy on the **Connection string** for **key1**.
198
134
199
-
###Add a blob container
135
+
## Add a blob container
200
136
201
137
1. In the search box at the top of the portal, enter **Storage account**. Select **Storage accounts** in the search results.
202
138
203
-
2. Select the storage account you created in the previous steps.
139
+
1. Select the storage account you created in the previous steps.
204
140
205
-
3. In the **Data storage** section, select **Containers**.
141
+
1. In the **Data storage** section, select **Containers**.
206
142
207
-
4. Select **+ Container** to create a new container.
143
+
1. Select **+ Container** to create a new container.
208
144
209
-
5. Enter **mycontainer** in **Name** and select **Private (no anonymous access)** under **Public access level**.
145
+
1. Enter **container** in **Name** and select **Private (no anonymous access)** under **Public access level**.
210
146
211
-
6. Select **Create**.
147
+
1. Select **Create**.
212
148
213
149
## Test connectivity to private endpoint
214
150
215
-
In this section, you'll use the virtual machine you created in the previous steps to connect to the storage account across the private endpoint using **Microsoft Azure Storage Explorer**.
151
+
In this section, you use the virtual machine you created in the previous steps to connect to the storage account across the private endpoint using **Microsoft Azure Storage Explorer**.
216
152
217
153
1. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines** in the search results.
218
154
219
-
2. Select **myVM**.
155
+
1. Select **vm-1**.
220
156
221
-
3. On the overview page for **myVM**, select**Connect** then**Bastion**.
157
+
1. In **Operations**, select **Bastion**.
222
158
223
-
4. Enter the username and password that you entered during the virtual machine creation.
159
+
1. Enter the username and password that you entered during the virtual machine creation.
224
160
225
-
5. Select **Connect**.
161
+
1. Select **Connect**.
226
162
227
-
6. Open Windows PowerShell on the server after you connect.
228
-
229
-
7. Enter `nslookup <storage-account-name>.blob.core.windows.net`. Replace **\<storage-account-name>** with the name of the storage account you created in the previous steps. You'll receive a message similar to what is displayed below:
163
+
1. Open Windows PowerShell on the server after you connect.
164
+
1. Enter `nslookup <storage-account-name>.blob.core.windows.net`. Replace **\<storage-account-name>** with the name of the storage account you created in the previous steps. The following example shows the output of the command.
A private IP address of **10.1.0.5** is returned for the storage account name. This address is in **mySubnet** subnet of **myVNet** virtual network you created previously.
242
-
243
-
8. Install [Microsoft Azure Storage Explorer](../vs-azure-tools-storage-manage-with-storage-explorer.md?tabs=windows&toc=%2fazure%2fstorage%2fblobs%2ftoc.json) on the virtual machine.
244
-
245
-
9. Select **Finish** after the **Microsoft Azure Storage Explorer** is installed. Leave the box checked to open the application.
246
-
247
-
10. Select the **Power plug** symbol to open the **Select Resource** dialog box.
248
-
249
-
11. In **Select Resource** , select **Storage account or service** to add a connection in **Microsoft Azure Storage Explorer** to your storage account that you created in the previous steps.
250
-
251
-
12. In the **Select Connection Method** screen, select **Connection string**, and then **Next**.
252
-
253
-
13. In the box under **Connection String**, paste the connection string from the storage account you copied in the previous steps. The storage account name will automatically populate in the box under **Display name**.
176
+
A private IP address of **10.0.0.10** is returned for the storage account name. This address is in **subnet-1** subnet of **vnet-1** virtual network you created previously.
254
177
255
-
14. Select **Next**.
178
+
1. Install [Microsoft Azure Storage Explorer](../vs-azure-tools-storage-manage-with-storage-explorer.md?tabs=windows&toc=%2fazure%2fstorage%2fblobs%2ftoc.json) on the virtual machine.
256
179
257
-
15. Verify the settings are correct in **Summary**.
180
+
1. Select **Finish** after the **Microsoft Azure Storage Explorer** is installed. Leave the box checked to open the application.
258
181
259
-
16. Select **Connect**
182
+
1. Select the **Power plug** symbol to open the **Select Resource** dialog box in the left-hand toolbar.
260
183
261
-
17. Select your storage account from the **Storage Accounts** in the explorer menu.
184
+
1. In **Select Resource** , select **Storage account or service** to add a connection in **Microsoft Azure Storage Explorer** to your storage account that you created in the previous steps.
262
185
263
-
18. Expand the storage account and then **Blob Containers**.
186
+
1. In the **Select Connection Method** screen, select **Connection string**, and then **Next**.
264
187
265
-
19. The **mycontainer** you created previously is displayed.
188
+
1. In the box under **Connection String**, paste the connection string from the storage account you copied in the previous steps. The storage account name automatically populates in the box under **Display name**.
266
189
267
-
20. Close the connection to **myVM**.
190
+
1. Select **Next**.
268
191
269
-
## Clean up resources
192
+
1. Verify the settings are correct in **Summary**.
270
193
271
-
If you're not going to continue to use this application, delete the virtual network, virtual machine, and storage account with the following steps:
194
+
1. Select **Connect**
272
195
273
-
1. From the left-hand menu, select **Resource groups**.
196
+
1. Select your storage account from the **Storage Accounts** in the explorer menu.
274
197
275
-
2. Select **TutorPEstorage-rg**.
198
+
1. Expand the storage account and then **Blob Containers**.
276
199
277
-
3. Select **Delete resource group**.
200
+
1. The **container** you created previously is displayed.
278
201
279
-
4. Enter **TutorPEstorage-rg** in **TYPE THE RESOURCE GROUP NAME**.
0 commit comments