Hi Abd Alrifai,
Thanks for reaching out to us on Microsoft Q&A forum.
As per Unit-4, In the "Determine network security group effective rules" unit, under the "VM 4" row, it states: Azure default rules apply to both subnet and NIC, and all inbound traffic is allowed is valid as per the scenario below:
The provided screenshot explicitly indicates that for VM4, in accordance with the documentation, the Network Security Group (NSG) was not set up for subnet 3 and NIC. Consequently, the Azure default rules are enforced for both the subnet and Network Interface Card (NIC) associated with VM4, allowing unrestricted inbound and outbound traffic.
As per Unit-3 In the "Determine network security group rules" unit, under "Inbound traffic rules," it mentions that only Vnet inbound traffic and load balancer inbound traffic is allowed, and everything else is denied is valid as per the scenario.
Scenario: - In Azure, when you create a Network Security Group (NSG), three default inbound security rules are established. These rules are designed to block all incoming traffic by default, except for the traffic originating from your virtual network and Azure load balancers.
As per Unit-4, In the "Determine network security group effective rules" under section "Inbound traffic effective rules" the statement "NSG inbound rules for a subnet in a VM take precedence over NSG inbound rules for a NIC in the same VM" is valid as per the screenshot below.
If the information is helpful, please accept the answer by clicking the "Accept Answer" on the post. If you are still facing any issue, please let us know in the comments. We are glad to help you.
Thank you.