![Hands-On Networking with Azure](https://wfqqreader-1252317822.image.myqcloud.com/cover/144/36700144/b_36700144.jpg)
上QQ阅读APP看书,第一时间看更新
Associating the NSG to a subnet
To associate the NSG to a subnet, you need to follow these steps:
- Navigate to the Network security groups that you have created and then select Subnets, as shown in the following screenshot:
![](https://epubservercos.yuewen.com/EC5107/19470396608902006/epubprivate/OEBPS/Images/9c524531-ff05-4f34-80cf-4a3e6c616129.png?sign=1738967793-GLNJ1ZXuZlcGcslTjRo44HIcrBSEaVbS-0-b361551aa10459efa7815debc59fcf2e)
Figure 2.18: Associated subnets to an NSG
- Click on Associate.
- A new blade will pop up, where you have to specify the virtual network within which the subnet exists, as shown in the following screenshot:
![](https://epubservercos.yuewen.com/EC5107/19470396608902006/epubprivate/OEBPS/Images/4ea2fe73-0e8a-4c68-8e89-c6345459f000.png?sign=1738967793-yxYKRi0wZWAMhx19EGhZfhv3LdEQh0vX-0-166b5ba8aa0b7d3726638a0ffa8b757a)
Figure 2.19: Choosing the VNet within which the subnet exists
- Then, you need to specify which subnet of the VNet you want to associate the NSG to, as shown in the following screenshot:
![](https://epubservercos.yuewen.com/EC5107/19470396608902006/epubprivate/OEBPS/Images/278e46cb-5435-4cff-9741-cec420ea6843.png?sign=1738967793-2pGoNFg29MdxlvPhIvFilsFv5ZwdWDn5-0-e92c1fcdd97e3db87fd54ed7e91f447c)
Figure 2.20: Selecting the subnet to which the NSG will be associated
- Once the subnet is selected, click on OK, and it will take some seconds to get it associated to the NSG.