An administrator configures the virtual network components in an Azure subscription as shown in the tables below:
Virtual Machines and Subnet Associations:
| Virtual Machine | Private IP | Subnet | Network Security Group (NSG) | Application Security Group (ASG) |
|---|---|---|---|---|
| VM1 | 10.1.1.4 | Subnet1 | NSG-NIC1 (NIC-level) | ASG-App |
| VM2 | 10.1.2.4 | Subnet2 | None | ASG-DB |
* `Subnet1` is associated with `NSG-Subnet1`.
* `Subnet2` is not associated with any subnet-level NSG.
* `VM2` does not have any NIC-level NSG.
NSG-Subnet1 Inbound Rules:
| Priority | Port | Protocol | Source | Destination | Action |
|---|---|---|---|---|---|
| 110 | 1433 | TCP | 10.1.2.0/24 | ASG-App | Allow |
| 120 | 1433 | TCP | Any | Any | Deny |
NSG-Subnet1 Outbound Rules:
| Priority | Port | Protocol | Source | Destination | Action |
|---|---|---|---|---|---|
| 110 | 1433 | TCP | ASG-App | 10.1.2.0/24 | Deny |
| 120 | 1433 | TCP | Any | Any | Allow |
NSG-NIC1 Inbound Rules:
| Priority | Port | Protocol | Source | Destination | Action |
|---|---|---|---|---|---|
| 150 | 1433 | TCP | 10.1.2.4 | Any | Deny |
| 160 | 1433 | TCP | Any | Any | Allow |
NSG-NIC1 Outbound Rules:
| Priority | Port | Protocol | Source | Destination | Action |
|---|---|---|---|---|---|
| 150 | 1433 | TCP | Any | ASG-DB | Allow |
| 160 | 1433 | TCP | Any | Any | Deny |
Which of the following describes the status of the connection attempts on TCP port 1433?
- AThe connection from VM2 to VM1 is allowed, and the connection from VM1 to VM2 is allowed.
- BThe connection from VM2 to VM1 is allowed, and the connection from VM1 to VM2 is denied.
- CThe connection from VM2 to VM1 is denied, and the connection from VM1 to VM2 is allowed.
- The connection from VM2 to VM1 is denied, and the connection from VM1 to VM2 is denied.Answer
Answer
The connection from VM2 to VM1 is denied, and the connection from VM1 to VM2 is denied.
The correct option is that both connections are denied. For the inbound connection from VM2 to VM1, the subnet-level NSG (NSG-Subnet1) allows it, but the NIC-level NSG (NSG-NIC1) denies it. For the outbound connection from VM1 to VM2, the NIC-level NSG allows it, but the subnet-level NSG denies it. Since a connection must be allowed at both the subnet and NIC levels to succeed, both connection attempts fail.
Step-by-Step Solution
Key Concept
Subnet-level and NIC-level NSG evaluation sequence for inbound and outbound traffic.