Skip to content

Commit 9eed291

Browse files
Add Portal instructions for duplicating NSG rules
1 parent 30189e4 commit 9eed291

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

articles/virtual-network/manage-network-security-group.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,28 @@ az network nsg rule create --resource-group myResourceGroup --nsg-name myNSG --n
303303
--destination-address-prefixes '*' --destination-port-ranges 3389 --protocol Tcp --description "Allow RDP"
304304
```
305305

306+
#### Duplicate security rules
307+
308+
To duplicate existing security rules, you can export the JSON of the existing NSG, extract the `securityRules`, and include it in your ARM template.
309+
310+
# [**Portal**](#tab/network-security-group-portal)
311+
312+
1. In the search box at the top of the portal, enter **Network security group**. Then select **Network security groups** in the search results.
313+
314+
1. Select the name of the NSG for which you want to duplicate the rules.
315+
316+
1. In the NSG's **Overview** page, expand the **Essentials** section and select the **JSON View** link on the far right.
317+
318+
1. In the **Resource JSON** half-pane, find `"properties"`. Within `"properties"`, find `"securityRules"`. Copy the full object of the security rule(s) you want to duplicate.
319+
320+
1. In the search box at the top of the portal, enter **Deploy a custom template** and select it in the search results.
321+
322+
1. In the **Custom deployment** page, select **Build your own template in the editor**.
323+
324+
1. In the **Edit template** page, specify the existing NSG where you want to duplicate the rules to through its name and location. Within the `"properties"` -> `"securityRules"` of the NSG, paste the copied security rule object(s).
325+
326+
1. Select **Save**. Select the desired subscription, resource group, and region, then select **Review + create**.
327+
306328
---
307329
### View all security rules
308330

0 commit comments

Comments
 (0)