- Network Security Groups (NSGs) are a set of rules that control the traffic flow in and out of the virtual network.
- NSGs can be applied to subnets or individual network interfaces attached to Azure VMs.
- Azure Account
- Azure Cloud Shell
- NSGs can be used to filter traffic to and from Azure resources in an Azure virtual network.
- NSGs can be used to filter traffic from the internet to Azure resources, or between Azure resources in a virtual network.
- NSGs can be used to filter traffic between subnets in a virtual network, or between a virtual network and on-premises network.
- I learned that NSGs are stateful, which means that if an inbound rule allows traffic in, an outbound rule is automatically created to allow the response traffic out.
- I learnt about NSGs from the Microsoft Learn website.
- Create a new NSG using the Azure CLI
az network nsg create \
--[RESOURCE GROUP NAME]\
--name [NSG NAME]
- Create a new NSG rule using the Azure CLI
az network nsg rule create \
--[RESOURCE GROUP NAME] \
--nsg-name [NSG NAME] \
--name allow-http \
--protocol tcp \
--priority 1000 \
--destination-port-range 80 \
--access allow
- I learned about Network Security Groups in Azure.
- I learned how to create a new NSG and a new NSG rule using the Azure CLI.
- I will learn about Azure Firewall.
✍️ Show that you shared your process on Twitter or LinkedIn