A company has an Azure virtual network with two subnets named Subnet-Web and Subnet-DB. A virtual machine named VM-Web is deployed in Subnet-Web and associated with an Application Security Group (ASG) named ASG-Web. A virtual machine named VM-DB is deployed in Subnet-DB and associated with an ASG named ASG-DB.
A Network Security Group (NSG) named NSG-Web is associated with Subnet-Web, and an NSG named NSG-DB is associated with Subnet-DB.
In NSG-DB, the following inbound security rules are configured:
- Rule1: Priority 150, Source: ASG-Web, Destination: ASG-DB, Port: 80, Protocol: TCP, Action: Deny
- Rule2: Priority 250, Source: Any, Destination: Any, Port: 80, Protocol: TCP, Action: Allow
NSG-Web contains a custom outbound rule that allows all traffic on port 80 to ASG-DB.
What is the outcome when VM-Web attempts to establish an HTTP connection on TCP port 80 to VM-DB?
- The connection is blocked because NSG-DB evaluates Rule1 (priority 150) before Rule2 (priority 250), which denies the traffic.Answer
- BThe connection is allowed because Rule2 in NSG-DB has a higher priority number (250) than Rule1 (150).
- CThe connection is allowed because NSG-Web allows the outbound traffic, which automatically bypasses the inbound rules of NSG-DB.
- DThe connection is allowed because Application Security Groups bypass inbound Network Security Group rules when VMs are in the same virtual network.