Skip to content

Commit dc7cc25

Browse files
Merge pull request #296066 from andreamichaelmsft/patch-1
Add Portal instructions for duplicating NSG rules
2 parents 0881fc4 + ad5e242 commit dc7cc25

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,26 @@ 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+
1. In the search box at the top of the portal, enter **Network security group**. Then select **Network security groups** in the search results.
311+
312+
1. Select the name of the NSG for which you want to duplicate the rules.
313+
314+
1. In the NSG's **Overview** page, expand the **Essentials** section and select the **JSON View** link on the far right.
315+
316+
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.
317+
318+
1. In the search box at the top of the portal, enter **Deploy a custom template** and select it in the search results.
319+
320+
1. In the **Custom deployment** page, select **Build your own template in the editor**.
321+
322+
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).
323+
324+
1. Select **Save**. Select the desired subscription, resource group, and region, then select **Review + create**.
325+
306326
---
307327
### View all security rules
308328

0 commit comments

Comments
 (0)