Configure network security with NSGs
In the previous part of this chapter, you learned how Azure Firewall can be used to protect the AVD environment. However, not all organizations use a firewall in Azure. To stay secure, these companies might use an NSG to keep their network secure. An NSG uses inbound and outbound rules to control the traffic.
Let’s have a look at creating an NSG with the following Azure PowerShell script. The first part is the variables. Replace these variables to match your organization:
$avdvnet = Get-AzVirtualNetwork -Name vnet-prd-jvn-avd-we-01 -ResourceGroupName rg-prd-jvn-avd-networking-01 $sharedsessionhostssubnet = Get-AzVirtualNetworkSubnetConfig -VirtualNetwork $avdvnet -Name "snet-prd-jvn-avd-shared-sessionhosts-01" $tagsnsgavd = @{"Environment"="Prd";"Solution"="NSG";"Costcenter"="IT"} New-AzNetworkSecurityGroup -Name "nsg-prd-jvn-avd-shared-sessionhosts-02"...