Home › Studies › SC-500 › Storage, Databases & Networking › Network Controls & VPN

Network Controls & VPN

NSGs and ASGs · Virtual Network Manager security admin rules · Virtual WAN security · P2S and S2S VPN security · Network Watcher diagnostics

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Network security groups (NSGs)

An NSG holds rules that allow or deny inbound traffic to, or outbound traffic from, several types of Azure resources. Rules are matched on source, source port, destination, destination port and protocol.

SettingWhat to know
Rule priorityA number between 100 and 4096. Lower numbers are processed first and processing stops at the first match.
Same priorityYou can't create two rules with the same priority and direction.
Default rulesAllowVNetInBound (65000), AllowAzureLoadBalancerInBound (65001), DenyAllInbound (65500); AllowVnetOutBound (65000), AllowInternetOutBound (65001), DenyAllOutBound (65500). You can't remove them, but you can override them with rules that have a higher priority (a lower number).
Source or destinationAny, an IP address, a CIDR block, a service tag or an application security group. A single rule can't list several service tags or ASGs; augmented security rules allow several IP addresses and ranges in one rule.
StateNSGs are stateful: a flow record lets return traffic through without a rule of its own.
Rule changesRule changes affect new connections only. Removing the rule that allowed an SSH session leaves that session connected; a new SSH attempt is blocked.

Where the NSG is applied

Exam trap: Azure default rules have the lowest priority so your custom rules are always processed first. To override a default allow, add a custom Deny with a lower priority number; don't try to delete the default rule.

Application security groups (ASGs)

An ASG groups VMs (by network interface) so NSG rules can name the application tier instead of IP addresses. A rule that names an ASG applies only to network interfaces that are members of it.

Azure Virtual Network Manager: security admin rules

Security admin rules are global network security rules that Azure Virtual Network Manager enforces on the virtual networks of a network group. They are evaluated before NSG rules.

ItemSecurity admin rulesNSG rules
OwnerCentral network or governance teamApplication or service teams
Applied onVirtual networksSubnets and network interfaces
EvaluationHigher priority, evaluated firstAfter security admin rules
ActionsAllow, Always allow, DenyAllow, Deny
Priority range1 to 4,096 (lower number wins)100 to 4096

Network groups

Static membershipDynamic membership
SelectionYou manually select individual virtual networks from the manager's scope.Azure Policy evaluates conditions; matching virtual networks join.
Azure PolicyNot requiredRequired
PermissionsRBAC permissions to join the network groupRBAC to join the group, plus read and write on the underlying policy
Best fitA small, stable set of virtual networksMany virtual networks, or membership driven by a condition such as a tag

A network group is a global container for virtual networks from any region, and one virtual network can be in several groups. You can't create multiple network managers with an overlapping scope of the same hierarchy and the same features selected.

Azure Virtual WAN security

Exam trap: A Private policy covers branches and virtual networks together. An Internet policy covers Internet-bound traffic only.

VPN security

Point-to-site (P2S) authentication

Tunnel typeAuthentication mechanism
OpenVPNAny subset of Microsoft Entra ID, RADIUS and Azure certificate
SSTPRADIUS or Azure certificate
IKEv2RADIUS or Azure certificate
IKEv2 and OpenVPNRADIUS, Azure certificate, or Microsoft Entra ID with RADIUS or certificate
IKEv2 and SSTPRADIUS or Azure certificate

Site-to-site (S2S) IPsec/IKE policy

Network Watcher: evaluate effective rules

ToolUse it toLimits
IP flow verifyCheck whether a packet to or from a VM is allowed or denied by NSG rules and Virtual Network Manager admin rules, and which rule decides.Tests TCP and UDP only; tests rules for a VM's network interface (not scale sets); needs a Network Watcher instance in the VM's subscription and region.
NSG diagnosticsSimulate a flow from a source and destination and see the rule that allows or denies it.Use it for ICMP and for scale-set network interfaces; targets include VMs, network interfaces, scale-set network interfaces and Application Gateway v2 (except private deployments).
Next hopGet the next hop type, IP address and route table ID for a destination.Returns System Route when no user-defined route applies.

IP flow verify returns Access allowed or Access denied, the rule name and the NSG with a link to edit it. It gives no link when a default security rule decides.

Exam Tips

Tick each tip once you can answer it without looking.

“Override a default NSG allow rule such as AllowVNetInBound” → Add a custom rule with a priority number lower than 65000. Trap: Default rules can't be removed. Custom rules use 100 to 4096, and two rules can't share a priority and direction.

“Which NSG is evaluated first for inbound traffic when the subnet and NIC both have one?” → The subnet NSG, then the NIC NSG. Trap: Outbound is the reverse: NIC NSG first, then the subnet NSG.

“A rule allowing SSH is deleted while a session is open” → The open session stays up; new connections are blocked. Trap: NSG changes affect new connections only.

“ASG members in different virtual networks” → Not allowed: all NICs in an ASG must be in the same virtual network as the first one. Trap: A NIC can belong to several ASGs, but an ASG can't span virtual networks.

“A rule needs several service tags as the source” → Not possible in one rule; augmented rules allow several IP ranges, not several tags or ASGs. Trap: Create separate rules for each service tag.

“Central team must block RDP everywhere, even where app teams allow it in NSGs” → Security admin rule with the Deny action in a Virtual Network Manager security admin configuration. Trap: An Allow security admin rule still goes on to the NSG rules; Always allow bypasses them and permits traffic.

“Second set of security admin rules in the same region” → Add another rule collection to the existing security admin configuration. Trap: Only one security admin configuration can be deployed per region.

“Virtual network outside the network manager scope is in a network group” → The configuration isn't applied to it; widen the scope or use a manager that covers it. Trap: Adding it to the group only records intent.

“Virtual networks join a group automatically by tag or other condition” → Dynamic membership (Azure Policy). Trap: Static membership is manual selection; scope only defines what the manager can manage.

“Security admin rules not applied to a subnet” → The subnet holds a service such as Firewall, Bastion, VPN Gateway, Application Gateway (without network isolation), Route Server, Virtual WAN or an ExpressRoute gateway. Trap: For whole virtual networks, SQL Managed Instance and Databricks are skipped by default.

“All branch, VNet and inter-hub traffic through the hub firewall” → Private Traffic Routing Policy (routing intent). Trap: An Internet policy only covers Internet-bound traffic, and a hub can have just one of each policy type.

“Routing intent can't be enabled on a Virtual WAN hub” → Custom route tables, or static routes with a virtual network connection as next hop, exist; remove them. Trap: Routing intent can't coexist with custom route tables.

“P2S VPN with Conditional Access and MFA” → OpenVPN + Microsoft Entra ID authentication + Azure VPN Client. Trap: IKEv2 and SSTP don't work with Entra ID authentication; SSTP is Windows-only.

“Different user groups to different P2S gateways” → One gateway and one custom audience app ID per group. Trap: A gateway supports a single Audience value.

“S2S custom IPsec/IKE policy” → One complete policy per connection (IKE and IPsec), on a supported SKU. Trap: Partial policies and Basic SKU aren't supported.

“Test whether ICMP is allowed by NSG rules” → NSG diagnostics. Trap: IP flow verify tests TCP and UDP only.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Database SecurityPrivate Access & Azure Firewall →