Azure Network Engineer Network Security Group Rules Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Questions: 20 | Updated: Aug 14, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. What happens when an inbound NSG rule specifies a destination port range of 80-443?

Explanation

An inbound NSG rule with destination port range `80-443` applies to every destination port from 80 through 443, including both endpoints. Traffic matching the rule on any of those ports is filtered according to the rule’s action.

Submit
Please wait...
About This Quiz
Azure Network Engineer Network Security Group Rules Quiz - Quiz

Test your understanding of Azure Network Security Groups (NSGs) and their rule configuration. This quiz covers NSG fundamentals, rule priorities, traffic filtering, and best practices for securing Azure virtual networks. Essential for Azure Network Engineers preparing for certification or real-world deployments.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. When deploying an NSG, what is the recommended approach for managing rule changes in production?

Explanation

Managing NSG rules through Infrastructure as Code and version control makes changes repeatable, reviewable, and auditable. It also supports testing before deployment and enables teams to track changes and roll back safely if a production update causes problems.

Submit

3. What is the purpose of the 'Source Port Range' field in an NSG inbound rule?

Explanation

In an NSG inbound rule, **Source Port Range** matches the port number used by the device or service that initiated the connection. This is often an ephemeral client port. It differs from the destination port, which identifies the port on the receiving VM, such as the port used by a web server.

Submit

4. An NSG rule specifies 'Access: Deny' and 'Priority: 150'. Another rule specifies 'Access: Allow' with 'Priority: 200' for the same traffic. Which action is taken?

Explanation

NSG rules are evaluated in ascending numerical priority order, so a rule with priority 150 is checked before one with priority 200. If the priority-150 deny rule matches the traffic, it determines the outcome, and the later allow rule is not applied.

Submit

5. To allow SSH traffic (port 22) from a specific IP address 203.0.113.5 to your Azure VM, which protocol should the NSG rule use?

Explanation

SSH uses TCP to establish a reliable connection on port 22. Configure the NSG rule to allow TCP traffic from the specific source IP address, 203.0.113.5, to the VM.

Submit

6. Which NSG rule direction applies to traffic leaving a virtual machine?

Explanation

Outbound NSG rules govern traffic that originates from a virtual machine and travels to an external destination or another network resource. They specify which outgoing connections are allowed or denied based on factors such as destination, protocol, and port. Inbound rules instead control traffic entering the VM, so traffic leaving it is classified as outbound.

Submit

7. How can you enable flow logs to monitor traffic filtered by NSG rules?

Explanation

Enable NSG Flow Logs in Azure Network Watcher to capture information about traffic flowing through network interfaces and subnets governed by NSG rules. The logs show allowed and denied traffic, helping you monitor network behavior and troubleshoot rule-related connectivity issues.

Submit

8. An NSG is associated with a subnet and a network interface. If they have conflicting rules, which is applied?

Explanation

When both a subnet and a network interface have an NSG, Azure evaluates the rules from both groups for traffic. The traffic must be allowed by each NSG to pass; a deny rule in either one blocks it. Thus, the combined effect is the more restrictive result.

Submit

9. When you create an NSG rule with source as a service tag (e.g., 'AzureKeyVault'), what does this represent?

Explanation

A service tag represents a predefined group of IP address prefixes associated with an Azure service, such as Azure Key Vault. Using it in an NSG rule avoids manually maintaining the service’s changing IP address ranges.

Submit

10. Azure provides default NSG rules. Which default rule has the highest priority number?

Explanation

Azure NSG rules are evaluated in ascending priority order, so a higher number means lower precedence. Default inbound rules include AllowVNetInBound at 65000, AllowAzureLoadBalancerInBound at 65001, and DenyAllInbound at 65500. Therefore, DenyAllInbound has the highest priority number among the listed rules.

Submit

11. What is the primary purpose of a Network Security Group (NSG) in Azure?

Explanation

A Network Security Group (NSG) controls network access to Azure resources by allowing or denying inbound and outbound traffic based on rules, such as source, destination, port, and protocol.

Submit

12. NSG rules can be applied at which Azure resource level?

Explanation

Network Security Groups (NSGs) control inbound and outbound network traffic using security rules. In Azure, an NSG can be associated with a subnet or a network interface, applying those rules to resources connected at either level. NSGs are not applied directly to subscriptions, resource groups, or virtual machines.

Submit

13. What is the maximum number of rules allowed in a single NSG?

Explanation

A single NSG can contain up to 5,000 rules. These rules control network traffic by specifying conditions such as direction, protocol, ports, and source or destination. This is the maximum rule capacity for one NSG.

Submit

14. Which NSG rule allows inbound traffic on port 443 from any source?

Explanation

This rule permits inbound TCP traffic to destination port 443 from any IPv4 source because `0.0.0.0/0` represents all IPv4 addresses. Port 443 is commonly used for HTTPS traffic.

Submit

15. Can you apply multiple NSGs to a single subnet in Azure?

Explanation

An Azure subnet can be associated with only one network security group (NSG) at a time. That NSG’s rules control inbound and outbound traffic for resources in the subnet; you can also associate a separate NSG directly with an individual network interface.

Submit

16. What does the asterisk (*) wildcard represent in an NSG rule's source or destination field?

Explanation

The asterisk (*) acts as a wildcard, matching any IP address when used in an address field or any port when used in a port field. This lets an NSG rule apply broadly without specifying individual addresses or ports.

Submit

17. An NSG rule has a priority of 100 and action 'Deny'. Another rule has priority 200 and action 'Allow' for the same traffic. Which rule is applied?

Explanation

NSG rules are evaluated in priority order, with lower numbers checked first. Since priority 100 comes before priority 200 and matches the same traffic, its Deny action is applied, and the later Allow rule is not considered.

Submit

18. Which transport protocol can NSG rules filter traffic on?

Explanation

NSG rules can filter network traffic by protocol, including TCP, UDP, and ICMP. TCP and UDP are transport-layer protocols, while ICMP supports network diagnostics such as ping. HTTP and HTTPS are application-layer protocols, so NSG rules do not select them directly; they can filter their traffic using TCP ports instead.

Submit

19. What is the default action for inbound traffic in an Azure NSG?

Explanation

By default, an Azure NSG allows inbound traffic from the virtual network and Azure Load Balancer, then denies all other inbound traffic. You can permit required access by adding an explicit allow rule with an appropriate priority, source, destination, and port.

Submit

20. In NSG rule priority, which number range is evaluated first?

Explanation

NSG rules are processed in ascending priority order, so a rule with a lower number is evaluated before one with a higher number. When traffic matches a rule, that rule’s allow or deny action applies. This makes priority values important when arranging rules that could match the same traffic.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What happens when an inbound NSG rule specifies a destination port...
When deploying an NSG, what is the recommended approach for managing...
What is the purpose of the 'Source Port Range' field in an NSG inbound...
An NSG rule specifies 'Access: Deny' and 'Priority: 150'. Another rule...
To allow SSH traffic (port 22) from a specific IP address 203.0.113.5...
Which NSG rule direction applies to traffic leaving a virtual machine?
How can you enable flow logs to monitor traffic filtered by NSG rules?
An NSG is associated with a subnet and a network interface. If they...
When you create an NSG rule with source as a service tag (e.g.,...
Azure provides default NSG rules. Which default rule has the highest...
What is the primary purpose of a Network Security Group (NSG) in...
NSG rules can be applied at which Azure resource level?
What is the maximum number of rules allowed in a single NSG?
Which NSG rule allows inbound traffic on port 443 from any source?
Can you apply multiple NSGs to a single subnet in Azure?
What does the asterisk (*) wildcard represent in an NSG rule's source...
An NSG rule has a priority of 100 and action 'Deny'. Another rule has...
Which transport protocol can NSG rules filter traffic on?
What is the default action for inbound traffic in an Azure NSG?
In NSG rule priority, which number range is evaluated first?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!