Implementing network security and application security groups
Some Azure components, such as VMs and application gateways, must be connected to a subnet within a VNet. When you create subnets, you can optionally attach an NSG, which can be used to control what ports can route into it.
When we created our VMs, an NSG is created and attached to the subnet they are in, and when we chose the option to open RDP and HTTP, these ports were added to that NSG.
To see the details of the NSG that was created, in the Azure portal, in the search box, type and then select Network Security Groups.
You will see a list of groups; one should be called PacktVM1-nsg
and be in the PacktLBResourceGroup
. Click on the NSG, as in the following example:
In the preceding screenshot, we can see five inbound rules and three outbound. The top two inbound rules highlighted in red were created when we created our VM when we specified allowing...