Domain 4 of 5 · Chapter 2 of 3

Configure secure access to virtual networks

Unlock the complete study guide + 25 practice exams totaling 1,497 questions.

Bundled into the existing Microsoft Azure Administrator premium course — no separate purchase.

14-day refund guarantee on one-time purchases and your first subscription charge.

Included in this chapter:

  • Network security groups and where they attach
  • How NSG rules are evaluated
  • Default rules and platform traffic
  • Naming traffic in rules: service tags, ASGs and address lists
  • Evaluation order: security admin rules, subnet NSG, NIC NSG
  • Creating NSG rules with Azure PowerShell and the Azure CLI
  • Finding the security rule that decides a flow
  • Azure Bastion: deployment and the connection path
  • Permissions for a Bastion connection
  • Choosing and changing a Bastion SKU
  • Keeping Bastion working: subnet NSG, routes and DNS
  • Service endpoints: enabling the subnet and authorizing it
  • Service endpoint policies for Azure Storage
  • Creating a private endpoint: placement, subresource and approval
  • Private endpoint DNS
  • Network policies for private endpoints

Service endpoint vs private endpoint for an Azure PaaS service

QuestionService endpointPrivate endpoint
What you createA setting on the client subnet, for example Microsoft.StorageA read-only NIC with a private IP in a subnet you choose
Address the client connects toThe service's public endpointThe private endpoint's private IP address
DNS changeNone; the hostname still resolves to a public IPA privatelink private DNS zone resolves the hostname to the private IP
What becomes reachableThe service as a whole; a service endpoint policy can narrow Azure Storage to listed accountsOnly the target subresource, such as the blob service of one account
On-premises clients over VPN or ExpressRouteNot covered; allow their public NAT addresses in the service firewallSupported over the private connection
Step on the service sideAdd a virtual network rule for the subnetApprove the connection; disable public access separately if required

Decision tree

Admin RDP or SSH toa VM's private IP?YesAzureBastionNoFilter traffic to orfrom VMs?YesNSG ruleswith ASGsNoReach a PaaS service ata private IP address?YesPrivateendpointNoLimit subnet egress tolisted storage accounts?YesService endpoint+ service endpointpolicyNoService endpoint+ virtual network rule

Cheat sheet

  • An NSG filters associated subnets and interfaces rather than an entire virtual network resource
  • The first matching NSG rule wins within a direction
  • NSGs evaluate the traffic tuple using the VM's private address
  • Stateful NSG filtering permits responses to an allowed connection
  • Default NSG rules allow virtual-network traffic but deny unsolicited internet ingress
  • Augmented rules combine explicit address ranges and ports into fewer NSG rules
  • Service tags track Azure service ranges rather than individual customer resources
  • ASGs let NSG rules follow application membership instead of manually maintained VM addresses
  • ASG members and ASG-to-ASG rules are limited to one virtual network
  • Az PowerShell separates NSG rule objects from the saved NSG resource
  • The VirtualNetwork service tag can include connected networks beyond the local VNet
  • NSG rule changes must be validated with new connections
  • Exempt Azure platform services require explicit service-tag targeting in NSG rules
  • Traffic must pass every applicable subnet and NIC NSG
  • Effective security rules show the combined configuration while IP flow verify evaluates one flow
  • NSG diagnostics extends rule diagnosis to scale sets and application gateways
  • Security admin rules can decide traffic before NSGs are evaluated
  • ICMP security-rule diagnosis needs NSG diagnostics rather than IP flow verify
  • Bastion provides RDP and SSH access without a public IP on the target VM
  • Dedicated Bastion needs AzureBastionSubnet and a compatible public IP unless deployed private-only
  • Bastion Standard adds native clients, custom ports, and configurable scale
  • Bastion Premium is required for private-only deployment and session recording
  • Bastion Developer is a free shared option for a single same-network connection
  • A Bastion subnet NSG must preserve platform traffic as well as user HTTPS
  • Bastion can be upgraded in place but downgrade and zone changes require recreation
  • Bastion resource visibility and guest sign-in rights are separate permissions
  • Bastion requires its supported platform routing and DNS paths to remain available
  • A service endpoint and the service's subnet allow rule are separate configuration steps
  • Service endpoints keep public service DNS while changing the client's service-traffic source identity
  • Service endpoints do not give on-premises clients a subnet's service identity
  • Service endpoint policies restrict Storage egress to selected accounts rather than an entire service region
  • Service endpoint setup requires both network permissions and service-specific eligibility
  • Storage endpoint type and subnet identity determine which account rules remain usable
  • A private endpoint exposes a service through a private interface in the consumer network
  • A private endpoint carries traffic only after its connection is approved
  • Private endpoints target specific service subresources rather than an entire account indiscriminately
  • Clients should keep the service FQDN and resolve it to the private endpoint address
  • A private DNS zone group maintains endpoint records as the endpoint changes
  • Hybrid clients need DNS forwarding into the Azure network that resolves the endpoint's private zone
  • Private endpoint NSG and UDR enforcement must be enabled on the hosting subnet
  • Inspecting private endpoint traffic needs a sufficiently specific UDR and enabled route policies
  • Creating a private endpoint does not by itself disable the service's public access

Unlock with Premium — includes all practice exams and the complete study guide.

Also tested in

References

  1. https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-104
  2. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview
  3. https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways
  4. https://learn.microsoft.com/en-us/azure/dns/private-dns-overview
  5. https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview
  6. https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security
  7. https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-overview
  8. https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview
  9. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-vnet-plan-design-arm
  10. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet
  11. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface
  12. https://learn.microsoft.com/en-us/azure/virtual-network/network-security-group-how-it-works
  13. https://learn.microsoft.com/en-us/azure/virtual-network/service-tags-overview
  14. https://learn.microsoft.com/en-us/azure/virtual-network/application-security-groups
  15. https://learn.microsoft.com/en-us/powershell/module/az.network/new-aznetworksecuritygroup
  16. https://learn.microsoft.com/en-us/azure/virtual-network/diagnose-network-traffic-filter-problem
  17. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-service-endpoint-policies-overview
  18. https://learn.microsoft.com/en-us/entra/fundamentals/concept-learn-about-groups
  19. https://learn.microsoft.com/en-us/azure/virtual-network/manage-network-security-group
  20. https://learn.microsoft.com/en-us/powershell/module/az.network/new-aznetworksecurityruleconfig
  21. https://learn.microsoft.com/en-us/cli/azure/network/nsg/rule
  22. https://learn.microsoft.com/en-us/azure/network-watcher/ip-flow-verify-overview
  23. https://learn.microsoft.com/en-us/azure/network-watcher/nsg-diagnostics-overview
  24. https://learn.microsoft.com/en-us/azure/network-watcher/diagnose-network-security-rules
  25. https://learn.microsoft.com/en-us/azure/bastion/bastion-overview
  26. https://learn.microsoft.com/en-us/azure/bastion/bastion-faq
  27. https://learn.microsoft.com/en-us/azure/bastion/bastion-nsg
  28. https://learn.microsoft.com/en-us/azure/bastion/configuration-settings
  29. https://learn.microsoft.com/en-us/azure/bastion/bastion-sku-comparison
  30. https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-windows
  31. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-service-endpoints-overview
  32. https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security-virtual-networks
  33. https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns
  34. https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns-integration
  35. https://learn.microsoft.com/en-us/azure/dns/private-dns-autoregistration
  36. https://learn.microsoft.com/en-us/azure/dns/dns-private-resolver-overview
  37. https://learn.microsoft.com/en-us/azure/private-link/disable-private-endpoint-network-policy
  38. https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections