Skip to content

Commit 65a41bf

Browse files
authored
Merge pull request #290407 from MicrosoftDocs/release-pp-nsp
Ignite 2024 Shiproom | Network Security Perimeter | Private Link | #329704
2 parents 188ddd1 + 900743d commit 65a41bf

25 files changed

+1127
-34
lines changed

articles/azure-resource-manager/management/azure-subscription-service-limits.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,11 @@ The maximum number of allowed Managed Run Commands is currently limited to 25.
580580

581581
[!INCLUDE [dev-tunnels-service-limits](../../../includes/dev-tunnels/dev-tunnels-service-limits.md)]
582582

583+
## Network Security Perimeters limits
584+
585+
[!INCLUDE [network-security-perimeter-limits](../../../includes/network-security-perimeter-limits.md)]
586+
587+
583588
## See also
584589

585590
* [Understand Azure limits and increases](https://azure.microsoft.com/blog/azure-limits-quotas-increase-requests/)
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
---
2+
title: Quickstart - Create a network security perimeter - Azure CLI
3+
description: Learn how to create a network security perimeter for an Azure resource using Azure CLI. This example demonstrates the creation of a network security perimeter for an Azure Key Vault.
4+
author: mbender-ms
5+
ms.author: mbender
6+
ms.service: azure-private-link
7+
ms.topic: quickstart
8+
ms.date: 11/06/2024
9+
#CustomerIntent: As a network administrator, I want to create a network security perimeter for an Azure resource using Azure CLI, so that I can control the network traffic to and from the resource.
10+
---
11+
12+
# Quickstart: Create a network security perimeter - Azure CLI
13+
14+
Get started with network security perimeter by creating a network security perimeter for an Azure key vault using Azure CLI. A [network security perimeter](network-security-perimeter-concepts.md) allows [Azure PaaS (PaaS)](./network-security-perimeter-concepts.md#onboarded-private-link-resources)resources to communicate within an explicit trusted boundary. Next, You create and update a PaaS resources association in a network security perimeter profile. Then you create and update network security perimeter access rules. When you're finished, you delete all resources created in this quickstart.
15+
16+
[!INCLUDE [network-security-perimeter-preview-message](../../includes/network-security-perimeter-preview-message.md)]
17+
18+
## Prerequisites
19+
20+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
21+
22+
[!INCLUDE [network-security-perimeter-add-preview](../../includes/network-security-perimeter-add-preview.md)]
23+
24+
- The [latest Azure CLI](/cli/azure/install-azure-cli), or you can use Azure Cloud Shell in the portal.
25+
- This article **requires version 2.38.0 or later** of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.
26+
- After upgrading to the latest version of Azure CLI, import the network security perimeter commands using `az extension add --name nsp`.
27+
28+
[!INCLUDE [azure-cli-prepare-your-environment.md](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
29+
30+
31+
32+
33+
## Connect to your Azure account and select your subscription
34+
35+
To get started, connect to [Azure Cloud Shell](https://shell.azure.com) or use your local CLI environment.
36+
37+
1. If using Azure Cloud Shell, sign in and select your subscription.
38+
1. If you installed CLI locally, sign in with the following command:
39+
40+
```azurecli-interactive
41+
# Sign in to your Azure account
42+
az login
43+
```
44+
45+
1. Once in your shell, select your active subscription locally with the following command:
46+
47+
```azurecli-interactive
48+
# List all subscriptions
49+
az account set --subscription <Azure Subscription>
50+
51+
# Re-register the Microsoft.Network resource provider
52+
az provider register --namespace Microsoft.Network
53+
```
54+
55+
## Create a resource group and key vault
56+
57+
Before you can create a network security perimeter, you have to create a resource group and a key vault resource.
58+
This example creates a resource group named **resource-group** in the WestCentralUS location and a key vault named **key-vault-YYYYDDMM** in the resource group with the following commands:
59+
60+
```azurecli-interactive
61+
az group create \
62+
--name resource-group \
63+
--location westcentralus
64+
65+
# Create a key vault using a datetime value to ensure a unique name
66+
67+
key_vault_name="key-vault-$(date +%s)"
68+
az keyvault create \
69+
--name $key_vault_name \
70+
--resource-group resource-group \
71+
--location westcentralus \
72+
--query 'id' \
73+
--output tsv
74+
```
75+
76+
## Create a network security perimeter
77+
78+
In this step, create a network security perimeter with the `az network perimeter create` command.
79+
80+
> [!NOTE]
81+
> Please do not put any personal identifiable or sensitive data in the network security perimeter rules or other network security perimeter configuration.
82+
83+
```azurecli-interactive
84+
az network perimeter create\
85+
--name network-security-perimeter \
86+
--resource-group resource-group \
87+
-l westcentralus
88+
```
89+
90+
## Create and update PaaS resources’ association with a new profile
91+
92+
In this step, you create a new profile and associate the PaaS resource, the Azure Key Vault with the profile using the `az network perimeter profile create` and `az network perimeter association create` commands.
93+
94+
> [!NOTE]
95+
> For the `--private-link-resource` and `--profile` parameter values, replace `<PaaSArmId>` and `<networkSecurityPerimeterProfileId>` with the values for the key vault and the profile ID, respectively.
96+
97+
1. Create a new profile for your network security perimeter with the following command:
98+
99+
```azurecli-interactive
100+
# Create a new profile
101+
az network perimeter profile create \
102+
--name network-perimeter-profile \
103+
--resource-group resource-group \
104+
--perimeter-name network-security-perimeter
105+
106+
```
107+
2. Associate the Azure Key Vault (PaaS resource) with the network security perimeter profile with the following commands.
108+
109+
```azurecli-interactive
110+
111+
# Get key vault id
112+
az keyvault show \
113+
--name $key_vault_name \
114+
--resource-group resource-group \
115+
--query 'id'
116+
117+
# Get the profile id
118+
az network perimeter profile show \
119+
--name network-perimeter-profile \
120+
--resource-group resource-group \
121+
--perimeter-name network-security-perimeter
122+
123+
# Associate the Azure Key Vault with the network security perimeter profile
124+
# Replace <PaaSArmId> and <networkSecurityPerimeterProfileId> with the ID values for your key vault and profile
125+
az network perimeter association create \
126+
--name network-perimeter-association \
127+
--perimeter-name network-security-perimeter \
128+
--resource-group resource-group \
129+
--access-mode Learning \
130+
--private-link-resource "{id:<PaaSArmId>}" \
131+
--profile "{id:<networkSecurityPerimeterProfileId>}"
132+
133+
```
134+
135+
1. Update association by changing the access mode to **enforced** with the `az network perimeter association create` command as follows:
136+
137+
```azurecli-interactive
138+
az network perimeter association create \
139+
--name network-perimeter-association \
140+
--perimeter-name network-security-perimeter \
141+
--resource-group resource-group \
142+
--access-mode Enforced \
143+
--private-link-resource "{id:<PaaSArmId>}" \
144+
--profile "{id:<networkSecurityPerimeterProfileId>}"
145+
```
146+
147+
## Manage network security perimeter access rules
148+
149+
In this step, you create, update, and delete a network security perimeter access rules with public IP address prefixes using the `az network perimeter profile access-rule` command.
150+
151+
1. Create an inbound access rule with a public IP address prefix for the profile created with the following command:
152+
153+
```azurecli-interactive
154+
155+
# Create an inbound access rule
156+
az network perimeter profile access-rule create \
157+
--name access-rule \
158+
--profile-name network-perimeter-profile \
159+
--perimeter-name network-security-perimeter \
160+
--resource-group resource-group \
161+
--address-prefixes "[192.0.2.0/24]"
162+
163+
```
164+
165+
1. Update your inbound access rule with another public IP address prefix with the following command:
166+
167+
```azurecli-interactive
168+
169+
# Update the inbound access rule
170+
az network perimeter profile access-rule create\
171+
--name access-rule \
172+
--profile-name network-perimeter-profile \
173+
--perimeter-name network-security-perimeter \
174+
--resource-group resource-group \
175+
--address-prefixes "['198.51.100.0/24', '192.0.2.0/24']"
176+
177+
```
178+
179+
1. If you need to delete an access rule, use the following command:
180+
181+
```azurepowershell-interactive
182+
# Delete the access rule
183+
az network perimeter profile access-rule delete \
184+
--Name network-perimeter-association \
185+
--profile-name network-perimeter-profile \
186+
--perimeter-name network-security-perimeter \
187+
--resource-group resource-group
188+
189+
[!INCLUDE [network-security-perimeter-note-managed-id](../../includes/network-security-perimeter-note-managed-id.md)]
190+
191+
## Delete all resources
192+
193+
To delete a network security perimeter and other resources in this quickstart, use the following commands:
194+
195+
```azurecli-interactive
196+
197+
# Delete the network security perimeter association
198+
az network perimeter association delete \
199+
--name network-perimeter-association \
200+
--resource-group resource-group \
201+
--perimeter-name network-security-perimeter
202+
203+
# Delete the network security perimeter
204+
az network perimeter delete \
205+
--resource-group resource-group \
206+
--name network-security-perimeter --yes
207+
208+
# Delete the key vault
209+
az keyvault delete \
210+
--name $key_vault_name \
211+
--resource-group resource-group
212+
213+
# Delete the resource group
214+
az group delete \
215+
--name resource-group \
216+
--yes \
217+
--no-wait
218+
219+
```
220+
221+
[!INCLUDE [network-security-perimeter-delete-resources](../../includes/network-security-perimeter-delete-resources.md)]
222+
223+
## Next steps
224+
225+
> [!div class="nextstepaction"]
226+
> [Diagnostic logging for Azure Network Security Perimeter](./network-security-perimeter-diagnostic-logs.md)
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Quickstart - Create a network security perimeter - Azure portal
3+
description: Learn how to create a network security perimeter for an Azure resource using the Azure portal. This example demonstrates the creation of a network security perimeter for an Azure Key Vault.
4+
author: mbender-ms
5+
ms.author: mbender
6+
ms.service: azure-private-link
7+
ms.topic: quickstart
8+
ms.date: 11/04/2024
9+
#CustomerIntent: As a network administrator, I want to create a network security perimeter for an Azure resource in the Azure portal, so that I can control the network traffic to and from the resource.
10+
---
11+
12+
# Quickstart: Create a network security perimeter - Azure portal
13+
14+
Get started with network security perimeter by creating a network security perimeter for an Azure key vault using the Azure portal. A [network security perimeter](network-security-perimeter-concepts.md) allows [Azure PaaS (PaaS)](./network-security-perimeter-concepts.md#onboarded-private-link-resources)resources to communicate within an explicit trusted boundary. Next, You create and update a PaaS resources association in a network security perimeter profile. Then you create and update network security perimeter access rules. When you're finished, you delete all resources created in this quickstart.
15+
16+
[!INCLUDE [network-security-perimeter-preview-message](../../includes/network-security-perimeter-preview-message.md)]
17+
18+
## Prerequisites
19+
20+
Before you begin, make sure you have the following:
21+
22+
- An Azure account with an active subscription and access to the Azure portal. If you don't already have an Azure account, [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
23+
24+
[!INCLUDE [network-security-perimeter-add-preview](../../includes/network-security-perimeter-add-preview.md)]
25+
26+
## Sign in to the Azure portal
27+
28+
Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
29+
30+
## Create a resource group and key vault
31+
32+
Before creating a network security perimeter, you create a resource group to hold all resources and a key vault that's protected by a network security perimeter.
33+
34+
> [!NOTE]
35+
> Azure Key Vault requires a unique name. If you receive an error that the name is already in use, try a different name. In our example, we use a unique name by appending Year (YYYY), Month (MM), and Day (DD) to the name - **key-vault-YYYYDDMM**.
36+
37+
1. In the search box at the top of the portal, enter **Key vaults**. Select **Key vaults** in the search results.
38+
1. In the Key vaults accounts window that appears, select **+ Create**.
39+
1. In the **Create a key vault** window, enter the following information:
40+
41+
|**Setting**| **Value** |
42+
| --- | --- |
43+
| Subscription | Select the subscription you want to use for this key vault. |
44+
| Resource group | Select **Create new**, then enter **resource-group** as the name. |
45+
| Key vault name | Enter **key-vault-`<RandomNameInformation>`**. |
46+
| Region | Select the region in which you want your key vault to be created. For this quickstart, **(US) West Central US** is used. |
47+
48+
2. Leave the remaining default settings, and select **Review + Create** > **Create**.
49+
50+
## Create a network security perimeter
51+
52+
Once you create a key vault, you can proceed to create a network security perimeter.
53+
54+
> [!NOTE]
55+
> For organizational and informational safety, it's advised **not to include any personally identifiable or sensitive data** in the network security perimeter rules or other network security perimeter configuration.
56+
57+
1. In the search box of the Azure portal, enter **network security perimeters**. Select **network security perimeters** from the search results.
58+
2. In the **network security perimeters** window, select **+ Create**.
59+
3. In the **Create a network security perimeter** window, enter the following information:
60+
61+
| **Setting** | **Value** |
62+
| --- | --- |
63+
| Subscription | Select the subscription you want to use for this network security perimeter. |
64+
| Resource group | Select **resource-group**. |
65+
| Name | Enter **network-security-perimeter**. |
66+
| Region | Select the region in which you want your network security perimeter to be created. For this quickstart, **(US) West Central US** is used. |
67+
| Profile name | Enter **profile-1**. |
68+
69+
4. Select the **Resources** tab or **Next** to proceed to the next step.
70+
5. In the **Resources** tab, select **+ Add**.
71+
6. In the **Select resources** window, check **key-vault-YYYYDDMM** and choose **Select**.
72+
7. Select **Inbound access rules** and select **+ Add**.
73+
8. In the **Add inbound access rule** window, enter the following information, and select **Add**:
74+
75+
| **Settings** | **Value** |
76+
| --- | --- |
77+
| Rule name | Enter **inbound-rule**. |
78+
| Source type | Select **IP address ranges**. |
79+
| Allowed Sources | Enter a public IP address range you wish to allow inbound traffic from. |
80+
81+
9. Select **Outbound access rules** and select **+ Add**.
82+
10. In the **Add outbound access rule** window, enter the following information, and select **Add**:
83+
84+
| **Settings** | **Value** |
85+
| --- | --- |
86+
| Rule name | Enter **outbound-rule**. |
87+
| Destination type | Select **FQDN**. |
88+
| Allowed Destinations | Enter the FQDN of the destinations you want to allow. For example, **www.contoso.com**. |
89+
90+
11. Select **Review + create** and then **Create**.
91+
12. Select **Go to resource** to view the newly created network security perimeter.
92+
93+
[!INCLUDE [network-security-perimeter-note-managed-id](../../includes/network-security-perimeter-note-managed-id.md)]
94+
95+
## Delete a network security perimeter
96+
97+
When you no longer need a network security perimeter, you remove any resources associated with the network security perimeter and then remove the perimeter following these steps:
98+
99+
1. From your network security perimeter, select **Associated resources** under **Settings**.
100+
2. Select **key-vault-YYYYDDMM** from the list of associated resources.
101+
3. From the action bar, select **Settings ** and then select **Remove** in the confirmation window.
102+
4. Navigate back to the **Overview** page of your network security perimeter.
103+
5. Select **Delete** and confirm the deletion by entering **network-security-perimeter** in the text box for the name of the resource.
104+
6. Browse to the **resource-group** and select **Delete** to remove the resource group and all resources within it.
105+
106+
[!INCLUDE [network-security-perimeter-delete-resources](../../includes/network-security-perimeter-delete-resources.md)]
107+
108+
## Next steps
109+
110+
> [!div class="nextstepaction"]
111+
> [Diagnostic logging for Azure Network Security Perimeter](./network-security-perimeter-diagnostic-logs.md)

0 commit comments

Comments
 (0)