Using Console
Using CLI
<subscription-id>
with the ID of the subscription you want to work with.
<nsg-name>
with a unique name for the NSG and <resource-group-name>
with the name of the resource group where you want to create the NSG.
<rule-name>
with a unique name for the rule, <nsg-name>
with the name of the NSG you created in step 3, <resource-group-name>
with the name of the resource group where the NSG is located, and <ip-address>
with the IP address you want to allow traffic from.
You can also create additional rules to allow traffic for specific ports and protocols.
<subnet-name>
with the name of the subnet you want to associate the NSG with, <vnet-name>
with the name of the virtual network where the subnet is located, <resource-group-name>
with the name of the resource group where the virtual network is located, and <nsg-name>
with the name of the NSG you created in step 3.
Using Python
begin_create_or_update
method.