Azure Security Engineer · Domain 2 of 4 · 24% of the exam

Azure Security Engineer Domain 2: Secure Networking

48 free practice questions for Secure Networking in the Microsoft Azure Security Engineer Associate (AZ-500) exam. Try each question first, then open "Show answer" for the correct option and explanation.

Secure Networking practice questions

  1. Question 1. An NSG has an inbound rule with priority 100 allowing TCP 3389 and a rule with priority 200 denying it. What happens to RDP traffic?

    1. It is denied, because deny rules always win
    2. It is allowed, because the lower priority number is processed first
    3. It is denied, because the higher number wins
    4. It is dropped until both rules are removed
    Show answer

    Answer: B. It is allowed, because the lower priority number is processed first

    NSG rules are processed in priority order, lowest number first, and processing stops at the first match.

  2. Question 2. An NSG on a subnet has only the default rules. A VM in a peered VNet connects to a VM in the subnet on port 22. What happens?

    1. It is denied by the default DenyAllInBound rule
    2. It is allowed only if a public IP is attached
    3. It is denied because peering traffic needs a UDR
    4. It is allowed by the default AllowVnetInBound rule
    Show answer

    Answer: D. It is allowed by the default AllowVnetInBound rule

    The VirtualNetwork service tag covers the VNet, peered VNets, and connected on-premises ranges, so the default rule allows it.

  3. Question 3. NSG rules must allow SQL traffic only to Azure SQL in West Europe without listing IP ranges. What should be used as the destination?

    1. A private DNS zone
    2. The Sql.WestEurope service tag
    3. An application security group
    4. The VirtualNetwork tag
    Show answer

    Answer: B. The Sql.WestEurope service tag

    Service tags represent Microsoft-managed IP prefixes for a service, optionally per region.

  4. Question 4. Web VMs and app VMs are in the same subnet. Only web VMs should reach app VMs on port 8443. What is the cleanest NSG design?

    1. One NSG rule for every VM's private IP address
    2. Separate virtual networks for every single VM
    3. A route table with a next hop of None for app VMs
    4. Application security groups for web and app as source and destination
    Show answer

    Answer: D. Application security groups for web and app as source and destination

    ASGs group NICs by role, so rules stay valid as VMs are added.

  5. Question 5. An engineer needs to know whether an NSG is blocking traffic from a VM to a specific IP and port. Which tool answers quickly?

    1. Azure Advisor
    2. Network Watcher IP flow verify
    3. Microsoft Entra sign-in logs
    4. Storage Explorer
    Show answer

    Answer: B. Network Watcher IP flow verify

    IP flow verify reports whether traffic is allowed or denied and names the NSG rule responsible.

  6. Question 6. Network traffic metadata for a VNet must be collected for security analysis, including allowed and denied flows. What is the current recommended feature?

    1. VNet flow logs in Network Watcher
    2. Boot diagnostics on each VM
    3. Activity log alerts on the VNet
    4. Application Insights on the VNet
    Show answer

    Answer: A. VNet flow logs in Network Watcher

    VNet flow logs replace NSG flow logs and capture flows at the VNet level, with Traffic Analytics for insight.

  7. Question 7. Azure Firewall must filter outbound HTTPS by fully qualified domain names such as *.github.com. Which rule type fits?

    1. Application rules
    2. NAT rules
    3. Network rules with IP addresses only
    4. NSG rules with service tags
    Show answer

    Answer: A. Application rules

    Application rules filter HTTP/S and SQL traffic by FQDN, including wildcard names.

  8. Question 8. Outbound traffic must be inspected for malware and intrusion signatures, including TLS inspection. Which Azure Firewall SKU is required?

    1. Azure Firewall Basic
    2. Azure Firewall Premium
    3. Azure Firewall Standard
    4. Any SKU with DNS proxy enabled
    Show answer

    Answer: B. Azure Firewall Premium

    Premium adds TLS inspection, IDPS, URL filtering, and web categories.

  9. Question 9. Azure Firewall must resolve FQDNs in network rules consistently with the clients. What should be enabled?

    1. DNS proxy on the firewall, used by clients as their DNS server
    2. A NAT gateway associated with the firewall subnet
    3. Forced tunneling of all traffic to on-premises
    4. A service endpoint for Storage on the firewall subnet
    Show answer

    Answer: A. DNS proxy on the firewall, used by clients as their DNS server

    DNS proxy makes the firewall and clients resolve names the same way, which FQDN network rules rely on.

  10. Question 10. Rules for Azure Firewalls in several regions should be managed centrally with inheritance. What should be used?

    1. A separate classic rule collection on each firewall
    2. Azure Firewall Manager with parent and child firewall policies
    3. NSGs on each firewall subnet
    4. Azure Front Door rules
    Show answer

    Answer: B. Azure Firewall Manager with parent and child firewall policies

    Firewall Manager applies policies across hubs and VNets, and child policies inherit from parent policies.

  11. Question 11. All internet-bound traffic from spoke VNets must go through Azure Firewall in the hub. What must be configured in the spokes?

    1. A UDR for 0.0.0.0/0 with the firewall's private IP as next hop
    2. A service endpoint for Microsoft.Web on each spoke subnet
    3. An NSG rule allowing Internet outbound on each spoke
    4. A public IP address attached to each spoke VM
    Show answer

    Answer: A. A UDR for 0.0.0.0/0 with the firewall's private IP as next hop

    UDRs override system routes and send traffic to the firewall as a virtual appliance.

  12. Question 12. Inbound RDP to a VM behind Azure Firewall should be published through the firewall's public IP. Which rule type is used?

    1. Application rules
    2. Threat intelligence rules
    3. DNAT rules
    4. Web category rules
    Show answer

    Answer: C. DNAT rules

    DNAT rules translate the firewall's public IP and port to the VM's private IP and port.

  13. Question 13. Azure Firewall should block traffic to known malicious IPs and domains from Microsoft threat intelligence. Which setting does this?

    1. IDPS set to Off mode on the firewall policy
    2. A NAT rule that forwards port 443 to a honeypot
    3. A diagnostic setting that sends logs to storage only
    4. Threat intelligence-based filtering in Alert and deny mode
    Show answer

    Answer: D. Threat intelligence-based filtering in Alert and deny mode

    Threat intelligence mode can alert only or alert and deny traffic to known bad destinations.

  14. Question 14. A web app behind Application Gateway must be protected from OWASP top 10 attacks. What should be enabled?

    1. Azure DDoS Network Protection on the VNet only
    2. An NSG on the backend subnet that allows port 443
    3. A private DNS zone for the app's custom domain
    4. Web Application Firewall on Application Gateway with managed rules
    Show answer

    Answer: D. Web Application Firewall on Application Gateway with managed rules

    WAF uses the Default Rule Set (or CRS) to detect and block common web attacks.

  15. Question 15. A new WAF policy is causing false positives. What should be done while tuning the rules?

    1. Run in Detection mode and review logs before Prevention
    2. Delete the WAF policy and rely on NSGs instead
    3. Disable all managed rules permanently on the policy
    4. Move the app to a public IP without any WAF
    Show answer

    Answer: A. Run in Detection mode and review logs before Prevention

    Detection mode logs matches without blocking, so exclusions can be added before enforcing.

  16. Question 16. A specific request header is triggering a WAF managed rule for a trusted API. What is the targeted fix?

    1. Disabling the entire managed rule set
    2. Switching to Detection mode forever
    3. A WAF exclusion for that header on the affected rule
    4. Removing HTTPS from the listener
    Show answer

    Answer: C. A WAF exclusion for that header on the affected rule

    Exclusions skip inspection of specific request attributes, keeping the rest of the protection.

  17. Question 17. Requests from a single client IP exceeding 1,000 per minute must be blocked at the edge. What should be configured in Azure Front Door WAF?

    1. A geo-filtering rule only
    2. A bot protection rule set only
    3. A private link origin
    4. A rate limit custom rule
    Show answer

    Answer: D. A rate limit custom rule

    Rate limit rules count requests per client over a window and apply an action when exceeded.

  18. Question 18. A public-facing app must get cost protection and rapid response support during a large DDoS attack. Which tier is needed?

    1. DDoS infrastructure protection included by default
    2. Azure Firewall Basic
    3. Azure DDoS Network Protection or IP Protection
    4. An NSG with a deny-all rule
    Show answer

    Answer: C. Azure DDoS Network Protection or IP Protection

    Paid tiers add adaptive tuning, attack analytics, and access to the DDoS Rapid Response team.

  19. Question 19. Which statement about DDoS IP Protection compared with Network Protection is correct?

    1. IP Protection is billed per public IP and lacks cost protection and DRR support
    2. IP Protection covers all IPs in a tenant for one fee
    3. IP Protection is free with every VNet
    4. IP Protection only protects private IP addresses
    Show answer

    Answer: A. IP Protection is billed per public IP and lacks cost protection and DRR support

    IP Protection suits a few public IPs, while Network Protection covers a VNet's IPs and adds extra services.

  20. Question 20. Admins need RDP and SSH to VMs without any public IPs on the VMs. What should be deployed?

    1. A public load balancer with NAT rules
    2. A VPN gateway with policy-based routing
    3. Azure Front Door with WAF
    4. Azure Bastion in the VNet
    Show answer

    Answer: D. Azure Bastion in the VNet

    Bastion provides TLS-based access through the portal or native client, and VMs keep only private IPs.

  21. Question 21. Management ports on VMs should be closed and opened only on request for a limited time. What provides this?

    1. Just-in-time VM access in Defender for Servers
    2. An NSG with port 3389 open to Any
    3. A NAT gateway on the subnet
    4. Azure DNS private zones
    Show answer

    Answer: A. Just-in-time VM access in Defender for Servers

    JIT adds temporary NSG allow rules for the requesting IP and removes them when the time ends.

  22. Question 22. A storage account should accept traffic only from one subnet, using the Azure backbone, while keeping its public endpoint. What should be configured?

    1. A private endpoint with public access disabled
    2. A NAT gateway on the subnet
    3. A service endpoint on the subnet and a storage firewall VNet rule
    4. An application security group
    Show answer

    Answer: C. A service endpoint on the subnet and a storage firewall VNet rule

    Service endpoints identify the subnet to the service, and the storage firewall allows only that subnet.

  23. Question 23. A storage account must have no public endpoint access at all and be reached on a private IP. What should be used?

    1. A private endpoint with public network access disabled
    2. A service endpoint with a VNet rule
    3. An IP firewall rule for the office
    4. A shared access signature
    Show answer

    Answer: A. A private endpoint with public network access disabled

    Private endpoints map the service to a private IP, and disabling public access blocks the public endpoint.

  24. Question 24. Which additional resource is usually needed so clients resolve a PaaS service to its private endpoint IP?

    1. A public DNS A record that points to the public IP
    2. A NAT gateway on the client subnet
    3. A privatelink private DNS zone linked to the VNet
    4. A route table with a default route to the internet
    Show answer

    Answer: C. A privatelink private DNS zone linked to the VNet

    The privatelink zone overrides resolution so the public name resolves to the private IP inside the VNet.

  25. Question 25. Service endpoint policies are used for what purpose?

    1. Limiting which storage accounts a subnet can reach via its endpoint
    2. Encrypting all traffic between peered virtual networks
    3. Load balancing storage requests across several regions
    4. Replacing the network security groups on the subnet
    Show answer

    Answer: A. Limiting which storage accounts a subnet can reach via its endpoint

    Policies prevent data exfiltration to unauthorized storage accounts over the service endpoint.

  26. Question 26. A site-to-site VPN must use specific IPsec encryption and integrity algorithms required by the security team. What should be configured?

    1. A custom IPsec/IKE policy on the connection
    2. A NAT gateway on the gateway subnet
    3. An NSG on the GatewaySubnet
    4. A service endpoint for the VPN
    Show answer

    Answer: A. A custom IPsec/IKE policy on the connection

    Custom policies set IKE and IPsec algorithms, DH groups, and SA lifetimes instead of the defaults.

  27. Question 27. Point-to-site VPN users must authenticate with their Microsoft Entra accounts and MFA. Which authentication type fits?

    1. Microsoft Entra ID authentication with OpenVPN
    2. Certificate authentication only on the gateway
    3. Pre-shared key authentication for each user
    4. RADIUS authentication without any MFA
    Show answer

    Answer: A. Microsoft Entra ID authentication with OpenVPN

    Entra authentication for P2S lets Conditional Access and MFA apply to VPN sign-ins.

  28. Question 28. Traffic over ExpressRoute private peering must be encrypted end to end at layer 2 between the customer's routers and Microsoft's edge. What provides this?

    1. TLS on each application only
    2. An NSG on the gateway subnet
    3. MACsec on ExpressRoute Direct ports
    4. Azure DDoS IP Protection
    Show answer

    Answer: C. MACsec on ExpressRoute Direct ports

    MACsec encrypts traffic on the physical links of ExpressRoute Direct. IPsec over ExpressRoute is another option.

  29. Question 29. Which statement about NSGs on the GatewaySubnet is correct?

    1. They aren't supported and can break VPN or ExpressRoute gateways
    2. They are required on every gateway subnet
    3. They replace the need for IPsec policies
    4. They are the only way to filter VPN traffic
    Show answer

    Answer: A. They aren't supported and can break VPN or ExpressRoute gateways

    Microsoft doesn't support NSGs on GatewaySubnet. Filter traffic elsewhere, such as on spoke subnets or with a firewall.

  30. Question 30. An App Service web app must accept inbound traffic only from Azure Front Door. What should be configured?

    1. A private DNS zone for the app's default hostname
    2. A system-assigned managed identity on the web app
    3. Access restrictions with the AzureFrontDoor.Backend tag and X-Azure-FDID check
    4. A separate deployment slot used for production traffic
    Show answer

    Answer: C. Access restrictions with the AzureFrontDoor.Backend tag and X-Azure-FDID check

    The service tag limits source IPs to Front Door, and the header check limits traffic to your own Front Door profile.

  31. Question 31. An App Service app must reach a SQL database through a private endpoint. What should be enabled on the app?

    1. Access restrictions on inbound traffic
    2. Regional VNet integration
    3. A custom domain with TLS
    4. Client certificate mode
    Show answer

    Answer: B. Regional VNet integration

    VNet integration lets the app's outbound calls reach private endpoints in the VNet.

  32. Question 32. An API published in API Management must accept only requests with a valid Entra ID token. Which policy should be used?

    1. rate-limit-by-key on the subscription key
    2. validate-jwt or validate-azure-ad-token
    3. set-header to add an Authorization value
    4. cors with allowed origins set to any
    Show answer

    Answer: B. validate-jwt or validate-azure-ad-token

    Token validation policies check the signature, issuer, audience, and claims before forwarding the request.

  33. Question 33. Which Azure service lets private connectivity to a partner's service in their tenant without VNet peering?

    1. Global VNet peering between the two tenants' VNets
    2. A site-to-site VPN between the two company networks
    3. Azure Private Link service consumed through a private endpoint
    4. Public IP addresses restricted with NSG rules
    Show answer

    Answer: C. Azure Private Link service consumed through a private endpoint

    Private Link service exposes a service behind a Standard Load Balancer to consumers in other tenants.

  34. Question 34. Security admin rules must be enforced across hundreds of VNets and can't be overridden by NSG owners. What should be used?

    1. NSGs created and managed by each application team
    2. Classic rule collections on each Azure Firewall
    3. Azure Virtual Network Manager security admin rules
    4. Route tables with next hop None on each subnet
    Show answer

    Answer: C. Azure Virtual Network Manager security admin rules

    Security admin rules are evaluated before NSG rules, and an "always allow" or "deny" can't be overridden.

  35. Question 35. Which Azure Firewall feature lets rules refer to a group of IP addresses reused across many rules?

    1. IP groups
    2. Service tags only
    3. Application security groups
    4. DNS proxy
    Show answer

    Answer: A. IP groups

    IP groups hold IP addresses and ranges that multiple firewall policies can reference.

  36. Question 36. A Web Application Firewall must stop bots known for scraping and credential stuffing. Which rule set should be added?

    1. A geo-filter rule only
    2. The IP groups feature
    3. The Bot Manager rule set
    4. A DNAT rule
    Show answer

    Answer: C. The Bot Manager rule set

    The bot protection rule set uses Microsoft threat intelligence to classify good, bad, and unknown bots.

  37. Question 37. A virtual network has a subnet that should have no outbound internet access by default for new VMs. What newer VNet setting helps?

    1. A public IP address added to each new VM
    2. A private subnet (default outbound access turned off)
    3. Removing all NSGs from the subnet
    4. Enabling DNS proxy on the subnet's firewall
    Show answer

    Answer: B. A private subnet (default outbound access turned off)

    Private subnets turn off default outbound access, so VMs need an explicit method such as NAT gateway or a firewall.

  38. Question 38. Azure Bastion must allow admins to connect using their local SSH client and upload files. Which SKU is required?

    1. Standard or Premium SKU with native client support
    2. Basic SKU with the default settings
    3. Developer SKU shared across VNets
    4. Any SKU, as long as the VM has a public IP
    Show answer

    Answer: A. Standard or Premium SKU with native client support

    Native client support and file transfer need the Standard tier or higher.

  39. Question 39. Bastion sessions must be recorded for audit. Which Bastion capability provides this?

    1. Session recording (Premium SKU)
    2. Boot diagnostics on each target VM
    3. VNet flow logs on the Bastion subnet
    4. The subscription's activity log
    Show answer

    Answer: A. Session recording (Premium SKU)

    Premium Bastion can record graphical sessions to a storage container.

  40. Question 40. Reachability and latency from a VM to an on-premises endpoint must be tested continuously, with alerts on failures. Which Network Watcher tool fits?

    1. IP flow verify
    2. Packet capture
    3. Connection monitor
    4. Next hop
    Show answer

    Answer: C. Connection monitor

    Connection monitor runs ongoing checks between sources and destinations and reports loss and latency to Azure Monitor.

  41. Question 41. A security analyst needs a full packet trace of traffic to a suspicious VM for 10 minutes. What should be used?

    1. IP flow verify
    2. Network Watcher packet capture
    3. NSG diagnostics only
    4. Azure Advisor
    Show answer

    Answer: B. Network Watcher packet capture

    Packet capture records traffic on a VM or scale set to a storage account or local file.

  42. Question 42. Which Azure Firewall Premium feature can block access to websites by category, such as gambling?

    1. Web categories
    2. DNAT rules
    3. IP groups
    4. Forced tunneling
    Show answer

    Answer: A. Web categories

    Web categories filter by site category. Premium also supports full URL filtering.

  43. Question 43. Traffic from Azure Firewall to the internet must be sent to an on-premises proxy for inspection. What should be enabled?

    1. DNS proxy
    2. Threat intelligence in Alert mode
    3. A NAT gateway
    4. Forced tunneling with a firewall management subnet
    Show answer

    Answer: D. Forced tunneling with a firewall management subnet

    Forced tunneling routes internet-bound traffic to an on-premises device and needs a separate management subnet.

  44. Question 44. Which statement describes the order Azure Firewall policy processes rule collections?

    1. DNAT, then network, then application rules, by priority within each
    2. Application, then network, then DNAT rules
    3. All rules in random order
    4. Only the last matching rule applies
    Show answer

    Answer: A. DNAT, then network, then application rules, by priority within each

    Rule collection groups and collections are processed by priority, with DNAT first, then network, then application.

  45. Question 45. A company wants outbound traffic from a subnet to use a fixed set of public IPs while Azure Firewall still inspects it. What can be combined with the firewall?

    1. A private endpoint on the firewall
    2. An application security group
    3. A service endpoint policy
    4. A NAT gateway associated with the firewall subnet
    Show answer

    Answer: D. A NAT gateway associated with the firewall subnet

    A NAT gateway on AzureFirewallSubnet provides scalable SNAT with static IPs.

  46. Question 46. Storage account access keys should be kept as a fallback, but rotated automatically. What helps?

    1. Key expiration policies with automated key regeneration
    2. Keeping the same account key unchanged for years
    3. Sharing the account key with teams by email
    4. Disabling the storage firewall to simplify access
    Show answer

    Answer: A. Key expiration policies with automated key regeneration

    Key expiration policies warn about old keys, and automation can regenerate them.

  47. Question 47. Which DNS security capability can block VNet queries to known malicious domains?

    1. A private DNS zone named contoso.com
    2. A DNS security policy with domain lists
    3. An NSG outbound rule for port 53 only
    4. Azure Front Door caching of DNS answers
    Show answer

    Answer: B. A DNS security policy with domain lists

    DNS security policies allow or block queries by domain lists and log DNS traffic.

  48. Question 48. A network virtual appliance in the hub fails. Which design keeps spoke traffic flowing?

    1. Two NVAs behind an internal Standard Load Balancer with HA ports
    2. One NVA with a larger VM size
    3. Removing the UDRs during outages
    4. A public load balancer with a single backend
    Show answer

    Answer: A. Two NVAs behind an internal Standard Load Balancer with HA ports

    An internal load balancer with HA ports sends all flows to healthy NVAs.

Microsoft and Azure are trademarks of the Microsoft group of companies. These questions are original study material, not questions from the real exam.