A virtual machine named `VM-Web1` is associated with an Application Security Group named `ASG-ProdWeb` within an Azure environment. The subnet hosting `VM-Web1` uses a Network Security Group named `NSG-Subnet`. The network interface of `VM-Web1` uses a Network Security Group named `NSG-NIC`.
`NSG-Subnet` contains the following inbound security rule:
| Priority | Port | Protocol | Source | Destination | Action |
|---|---|---|---|---|---|
| 150 | 443 | TCP | Internet | Any | Allow |
`NSG-NIC` contains the following inbound security rules:
| Priority | Port | Protocol | Source | Destination | Action |
|---|---|---|---|---|---|
| 110 | 443 | TCP | Any | `ASG-ProdWeb` | Deny |
| 120 | 443 | TCP | Internet | Any | Allow |
A user attempts to establish an HTTPS (TCP port 443) connection from the Internet to `VM-Web1`.
Which of the following describes the final status of this connection attempt?
- ATraffic is permitted to reach the virtual machine because the subnet security group rule is evaluated first and grants access.
- Traffic is blocked at the network interface level by the security rule with priority 110.Cevap
- CTraffic is permitted to reach the virtual machine because the allow rule with priority 120 overrides the deny rule with priority 110.
- DTraffic is blocked at the subnet level because subnet-level rules always take precedence over network interface-level rules.
Cevap
Traffic is blocked at the network interface level by the security rule with priority 110.
Inbound traffic to an Azure virtual machine is evaluated first by the subnet-level NSG and then by the network interface-level NSG. In this scenario, the subnet NSG allows the traffic (priority 150). Next, the network interface NSG evaluates the traffic. Within the network interface NSG, rules are processed by priority from lowest number to highest. The rule with priority 110 (Deny to the Application Security Group) is evaluated before the rule with priority 120 (Allow). Since the destination virtual machine is a member of that Application Security Group, the deny rule matches first and blocks the traffic.
Adım Adım Çözüm
Anahtar Kavram
Evaluation order of subnet-level and network interface-level Network Security Groups (NSGs), and rule precedence based on priority numbers.