An organization has an Azure subscription containing two subnets named Subnet-Web () and Subnet-App (). A virtual machine named VM-Web is deployed in Subnet-Web, and its network interface is associated with an Application Security Group named ASG-Web. A virtual machine named VM-App is deployed in Subnet-App, and its network interface is associated with an Application Security Group named ASG-App.
A network security group named NSG-Subnet is associated with Subnet-App and contains the following inbound security rules:
* Priority : Source: ASG-Web, Destination: ASG-App, Port: , Protocol: TCP, Action: Deny
* Priority : Source: , Destination: Any, Port: , Protocol: TCP, Action: Allow
A network security group named NSG-NIC is associated with the network interface of VM-App and contains the following inbound security rule:
* Priority : Source: ASG-Web, Destination: ASG-App, Port: , Protocol: TCP, Action: Allow
What is the outcome when VM-Web attempts to connect to VM-App on TCP port ?
- AThe connection is allowed because the rule with priority in NSG-NIC has a higher precedence (lower priority number) than the deny rule in NSG-Subnet.
- The connection is blocked because NSG-Subnet is evaluated first for inbound traffic, and its rule with priority matches and denies the traffic.Answer
- CThe connection is allowed because the rule with priority in NSG-Subnet matches the source IP address range of VM-Web and overrides the rule with priority .
- DThe connection is blocked because NSG-NIC is evaluated first for inbound traffic, and the rule with priority is overridden by the subnet-level rules.