Discover how to determine which ports are allowed to connect to your Azure virtual machine when using multiple NSGs. Learn why only port 80 is accessible in this scenario and boost your understanding for the AZ-700 exam!
Table of Contents
Question
You have an Azure subscription that contains an Azure virtual machine named VM1. VM1 contains a network interface named NIC1 that is connected to a virtual network subnet named Subnet1. VM1 accepts connections over ports 21, 80, and 8081.
The subscription contains the following network security groups (NSGs):
- NSG1: Allows incoming traffic over ports 21 and 80
- NSG2: Allows incoming traffic over ports 80 and 8081
You associate NSG1 to NIC1 and NSG2 to Subnet1.
Which ports can be used to connect to VM1?
A. 21 and 80 only
B. 21, 80, and 8081
C. 80 and 8081 only
D. 80 only
Answer
D. 80 only
Explanation
You can connect to VM1 only over ports that are allowed in NSGs. If an NSG is associated to VM1, NIC, and the subnet to which VM1 is connected, you can connect to VM1 only over ports that are allowed in both NSGs. Because the stem states that only port 80 is allowed in both NSG1 and NSG2, you can connect to VM1 only over port 80.
Designing and Implementing Microsoft Azure Networking Solutions AZ-700 certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Designing and Implementing Microsoft Azure Networking Solutions AZ-700 exam and earn Designing and Implementing Microsoft Azure Networking Solutions AZ-700 certification.