You have an Azure subscription that contains a virtual network named `VNet1`. `VNet1` contains a single subnet named `Subnet1`.
`Subnet1` contains two virtual machines: `VM1` and `VM2`.
- The network interface of `VM1` is associated with an Application Security Group named `ASG-Web`.
- The network interface of `VM2` is associated with an Application Security Group named `ASG-DB`.
A Network Security Group named `NSG1` is associated with `Subnet1`. No other Network Security Groups are deployed.
`NSG1` contains the rules shown in the following tables:
Inbound Security Rules
| Priority | Source | Destination | Port | Protocol | Action |
|---|---|---|---|---|---|
| Any | ASG-DB | TCP | Deny | ||
| ASG-Web | ASG-DB | TCP | Allow |
Outbound Security Rules
| Priority | Source | Destination | Port | Protocol | Action |
|---|---|---|---|---|---|
| ASG-Web | Any | TCP | Allow | ||
| ASG-Web | ASG-DB | TCP | Deny |
A database application running on `VM2` listens on TCP port . `VM1` attempts to establish a connection to `VM2` on TCP port .
What is the result of the connection attempt?
- The connection is blocked inbound because the inbound rule at priority 120 takes precedence over the rule at priority 220.Cevap
- BThe connection is allowed because the inbound rule at priority 220 has a higher priority number, indicating it has higher precedence.
- CThe connection is blocked outbound because the rule at priority 230 is more specific and overrides the wildcard rule at priority 130.
- DThe connection is allowed because the outbound rule at priority 130 permits the traffic, and inbound rules are bypassed for intra-subnet communication.
Cevap
The connection is blocked inbound because the inbound rule at priority 120 takes precedence over the rule at priority 220.
The correct answer is correct because Azure NSGs evaluate rules in order of priority, where lower numbers have higher precedence. For intra-subnet traffic, subnet-level NSG rules are evaluated twice: outbound from the source VM and inbound to the destination VM. Outbound, the rule at priority 130 (Allow) takes precedence over the rule at priority 230 (Deny). Inbound, the rule at priority 120 (Deny) takes precedence over the rule at priority 220 (Allow), resulting in the connection being blocked inbound.
Adım Adım Çözüm
Anahtar Kavram
Subnet-level NSG rule evaluation for intra-subnet traffic and priority-based rule precedence.
Tahmini Süre:3m 0s