Skip to content

AZ-700 · Domain 5: Design and implement Azure network security services · 18% of the exam

Task 5.1: Implement and manage network security groups

Network security groups on subnets and network interfaces, application security groups, inbound and outbound rules, virtual network flow logs, IP flow verify, remote administration through Azure Bastion, and security admin rules in Azure Virtual Network Manager.

Study it

  • Network security groups and application security groups

    Partly covered by: VPC: Subnets, NAT & Firewalls

  • Virtual network flow logs, IP flow verify, Azure Bastion and security admin rules

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.

Question 1 · choose 1

The NSG nsg-app is associated with subnet snet-app (10.1.1.0/24); the VMs' network interfaces have no NSG. Its custom inbound rules are: priority 100, allow-web, source 10.1.0.0/24, destination port 443, Allow; priority 4000, deny-vnet, source VirtualNetwork, any destination port, Deny. vm1 (10.1.1.4) opens a TCP connection to vm2 (10.1.1.5) on port 1433; both VMs are in snet-app. What happens?

  1. AIt's allowed, because traffic between VMs in the same subnet doesn't pass through the subnet's NSG
  2. BIt's allowed by the default AllowVnetInBound rule
  3. CIt's denied by the default DenyAllInBound rule
  4. DIt's denied by deny-vnet
Show the answer and why
  • AIt's allowed, because traffic between VMs in the same subnet doesn't pass through the subnet's NSG

    Incorrect

    A subnet's NSG rules also apply to traffic between VMs inside the subnet.

  • BIt's allowed by the default AllowVnetInBound rule

    Incorrect

    Custom rules are processed before the default rules at 65000 and up, and deny-vnet matches first.

  • CIt's denied by the default DenyAllInBound rule

    Incorrect

    Processing stops at the first match, which is deny-vnet at 4000.

  • DIt's denied by deny-vnet

    Correct

    The subnet NSG filters intra-subnet traffic, and deny-vnet is the first rule that matches the flow.

Security rules in an NSG associated with a subnet affect connectivity between the VMs inside it. Rules are processed in priority order and processing stops at the first match, so deny-vnet blocks vm1 before the default rules are reached.

Question 2 · choose 1

vm-web has the private IP address 10.1.2.4 and a Standard public IP address, 20.50.1.10. You add an inbound rule to the NSG on its subnet so that internet clients can reach it on TCP 443. Which destination should the rule use?

  1. A10.1.2.4, the VM's private IP address
  2. B20.50.1.10, the VM's public IP address
  3. CThe Internet service tag
  4. DThe AzureLoadBalancer service tag
Show the answer and why
  • A10.1.2.4, the VM's private IP address

    Correct

    For inbound traffic, NSGs process traffic after Azure translates public IP addresses to private ones.

  • B20.50.1.10, the VM's public IP address

    Incorrect

    By the time the NSG processes inbound traffic, the public address has been translated to the private one.

  • CThe Internet service tag

    Incorrect

    Internet stands for address space outside the virtual network, and the VM is inside it.

  • DThe AzureLoadBalancer service tag

    Incorrect

    That tag identifies the platform's health probe source, not the VM.

To name a particular Azure resource in a security rule, use its private IP address. NSGs process inbound traffic after Azure translates public IP addresses to private IP addresses.

Question 3 · choose 1

Pings from 10.2.0.5 to vm-db stopped working after a change to an NSG. You want a Network Watcher tool to tell you whether the NSG rules applied to vm-db allow that ICMP traffic, and which rule decides. Which tool should you use?

  1. AIP flow verify, with the protocol set to ICMP
  2. BNext hop, from vm-db toward 10.2.0.5
  3. CA packet capture on vm-db
  4. DNSG diagnostics
Show the answer and why
  • AIP flow verify, with the protocol set to ICMP

    Incorrect

    IP flow verify only tests TCP and UDP rules.

  • BNext hop, from vm-db toward 10.2.0.5

    Incorrect

    Next hop reports routing, not security rules.

  • CA packet capture on vm-db

    Incorrect

    A capture records packets; it doesn't name the rule that allowed or denied them.

  • DNSG diagnostics

    Correct

    NSG diagnostics simulates a flow, ICMP included, and returns whether it's allowed or denied with the rule that decides it.

IP flow verify tests TCP and UDP only; for ICMP, and for scale sets, use NSG diagnostics, which simulates a flow against the applicable NSGs and reports the deciding rule.

Question 4 · choose 1

A partner's VPN device sends IPsec ESP traffic to an appliance in snet-vpn. The subnet's network security group needs an inbound rule that admits only ESP from the partner's address, but the engineer can't find ESP in the portal's protocol list. What should the engineer do?

  1. ARefresh the portal and pick ESP from the rule's protocol list
  2. BDefine the rule with protocol ESP in an ARM template
  3. CSet the protocol to Any, since a rule can't name ESP
  4. DAdd no rule; ESP traffic isn't filtered by security rules
Show the answer and why
  • ARefresh the portal and pick ESP from the rule's protocol list

    Incorrect

    The ESP and AH protocols aren't currently available in the Azure portal.

  • BDefine the rule with protocol ESP in an ARM template

    Correct

    ESP is a supported rule protocol and can be used through ARM templates, though not through the portal.

  • CSet the protocol to Any, since a rule can't name ESP

    Incorrect

    Rules can name ESP, and Any would admit more than ESP.

  • DAdd no rule; ESP traffic isn't filtered by security rules

    Incorrect

    ESP is one of the protocols a security rule can match.

A security rule's protocol can be TCP, UDP, ICMP, ESP, AH or Any. The ESP and AH protocols aren't currently available through the Azure portal, but they can be used through ARM templates.

Question 5 · choose 1

You want one NSG rule that allows TCP 1433 from the application security groups asg-web and asg-api to asg-db. What happens when you create it?

  1. AIt works, because augmented rules accept several groups in the source
  2. BIt works if both source groups are in the same virtual network as asg-db
  3. CIt works only with priority 100
  4. DIt can't be created; use one rule per source group
Show the answer and why
  • AIt works, because augmented rules accept several groups in the source

    Incorrect

    Augmented rules accept several IP addresses and ranges, but not several application security groups.

  • BIt works if both source groups are in the same virtual network as asg-db

    Incorrect

    The limit is on the number of groups in one rule.

  • CIt works only with priority 100

    Incorrect

    Priority doesn't change what a rule's source can contain.

  • DIt can't be created; use one rule per source group

    Correct

    You can't specify multiple application security groups in a single rule.

Augmented security rules combine several IP addresses, ranges and ports in one rule, but a rule can't name multiple service tags or application security groups. Create a rule per source group.

Question 6 · choose 1

You're enabling virtual network flow logs for VNet-Prod in East US and want to store them in an existing storage account. Which account can you use?

  1. AA premium storage account in East US
  2. BA standard storage account in West US
  3. CA standard storage account in East US, in a subscription of the same Microsoft Entra tenant
  4. DA standard storage account in East US that belongs to a subscription in another company's tenant
Show the answer and why
  • AA premium storage account in East US

    Incorrect

    Premium storage accounts aren't supported; the account must be standard.

  • BA standard storage account in West US

    Incorrect

    The storage account must be in the same region as the virtual network.

  • CA standard storage account in East US, in a subscription of the same Microsoft Entra tenant

    Correct

    The account must be standard, in the virtual network's region, and in its subscription or one associated with the same tenant.

  • DA standard storage account in East US that belongs to a subscription in another company's tenant

    Incorrect

    The subscription must be the network's own or one associated with the same Microsoft Entra tenant.

The storage account for virtual network flow logs must be a standard account in the same region as the virtual network, in the same subscription or in one associated with the same Microsoft Entra tenant.

Practice domain 5 →Practice all domains →