Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement and manage network security groups (NSGs) and application security groups (ASGs)

A worked example

Single answer

Contoso has a virtual network named VNet1 with a web subnet and a database subnet. Each subnet has its own NSG, and both NSGs contain only the default rules. No NSGs are associated with network interfaces. VM-web1 in the web subnet connects successfully to SQL Server on VM-db1 in the database subnet over TCP port 1433.

Which default rule in the database subnet's NSG permits the inbound connection from VM-web1?

Choose one answer
Why

Every NSG includes default rules that cannot be removed. Inbound, AllowVNetInBound (priority 65000) allows traffic from within the virtual network, which is why VM-web1 can reach VM-db1 on port 1433 when the NSGs contain only defaults. To block this path you must add a custom deny rule with a lower priority number.

  • Not correct: AllowAzureLoadBalancerInBound. This default rule allows traffic from Azure's load balancer. The connection here comes from a VM in the web subnet, not from the load balancer.
  • Correct: AllowVNetInBound. This default inbound rule at priority 65000 allows traffic that originates within the virtual network, so a connection from a VM in another subnet of VNet1 is permitted when no custom rule denies it.
  • Not correct: DenyAllInBound. DenyAllInBound at priority 65500 denies inbound traffic that no earlier rule allowed. It cannot be the rule that permits a successful connection.
  • Not correct: AllowVNetOutBound. AllowVNetOutBound is the outbound counterpart that permits traffic leaving resources toward the virtual network; it is not evaluated for traffic arriving at the database subnet.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free