{"id":4006,"date":"2026-10-11T20:51:05","date_gmt":"2026-10-11T20:51:05","guid":{"rendered":"https:\/\/www.exam-topics.com\/blog\/?p=4006"},"modified":"2026-10-21T18:22:17","modified_gmt":"2026-10-21T18:22:17","slug":"az-104-nsg-asg-routes-bastion-effective-rules","status":"publish","type":"post","link":"https:\/\/www.exam-topics.com\/blog\/az-104-nsg-asg-routes-bastion-effective-rules\/","title":{"rendered":"Microsoft AZ-104: Azure Network Security Groups and Bastion Operations"},"content":{"rendered":"<h2>NSGs filter traffic; routes choose packet paths<\/h2>\n<p>Network security groups filter supported inbound and outbound flows using priority, direction, protocol, source\/destination and ports. User-defined routes steer eligible packets to the intended next hop. Application security groups let supported NICs act as logical service tiers inside NSG rules. These do not substitute for one another: an allowed connection may still be unroutable, and a route to a destination does not mean the traffic is authorized.<\/p>\n<p>To test <a href=\"https:\/\/www.exam-topics.com\/az-104\">Microsoft AZ-104<\/a> network controls, draw a two-tier environment: a public web entry point, a private API subnet, and an operator who needs guest access. State allowed web-to-API ports, restricted admin access and prohibited lateral communication. The current <a href=\"https:\/\/learn.microsoft.com\/en-us\/credentials\/certifications\/resources\/study-guides\/az-104\" rel=\"nofollow\">Microsoft AZ-104 exam objectives<\/a> explicitly measure NSGs, effective rules, ASGs, UDRs and Azure Bastion.<\/p>\n<h2>Evaluate NSG rules in effective priority order<\/h2>\n<p>Each NSG rule has a numeric priority; lower numbers are evaluated ahead of higher numbers within the relevant rule set. Azure also supplies default security rules. A broad early allow may unintentionally permit more than a later deny. NSGs can attach at subnet and network-interface scopes, so the result for a NIC should be inspected through effective security rules rather than guessed from one resource object.<\/p>\n<p>Test an allowed application port and denied direct RDP\/SSH attempt. For each, record source and destination, protocol, effective rule, direction and actual connection outcome. A timeout can reflect routing, firewall or service state; an application-level 403 may show that the network path is open but service authorization was denied. Do not call every failed request an NSG problem.<\/p>\n<h2>Use ASGs to express application tiers<\/h2>\n<p>An application security group identifies a set of supported VM network interfaces for use in rules. It is not a Microsoft Entra group, a role assignment or an authorization token. Membership can make a web-to-API rule easier to manage without manually enumerating every VM private IP, but the underlying NSG is still what filters the traffic.<\/p>\n<p>Place disposable web and API NICs into appropriately named groups and create one narrow permitted application port. Add a second web VM, inspect membership and effective rules, and confirm it receives only the expected relationship. An ASG label does not configure TLS or open the guest OS firewall, so validate the process listening on the target port as well.<\/p>\n<h2>Model UDRs and return traffic<\/h2>\n<p>Azure automatically provides system routes, with other routes originating from supported peering, BGP and custom tables. A UDR can send matched destinations to a virtual appliance or supported gateway next hop. If the appliance lacks forwarding or the return route is asymmetric, a packet may disappear despite an allowed NSG. More-specific destination prefixes may affect which route matches.<\/p>\n<p>Before routing a spoke network through a hub, draw both request and response paths. <a href=\"https:\/\/www.exam-topics.com\/blog\/microsoft-az-104-azure-virtual-network-peering-design\/\">VNet peering<\/a> is not transitive by default; gateway transit requires compatible explicit configuration. Compare NIC effective routes before and after a narrow UDR change, and test reachability rather than assuming a route table association is enough.<\/p>\n<h2>Use Bastion rather than broad public management exposure<\/h2>\n<p>Azure Bastion supports private RDP\/SSH administration through a managed deployment and compatible configurations. Operators still require suitable Azure resource rights and guest credentials. A visible Bastion resource is not proof its subnet, target access and selected SKU\/features permit the attempted connection. Confirm subnet and regional requirements against Microsoft&#8217;s <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/bastion\/bastion-overview\" rel=\"nofollow\">Azure Bastion<\/a> documentation.<\/p>\n<p>Run a disposable guest-access test against a VM without a public IP. If it fails, separate Bastion resource\/network configuration, NSG reachability, Azure role, guest account and VM health. Do not expose management ports to the internet merely to obtain a green connection; that defeats the intended security boundary.<\/p>\n<h2>Contrast private endpoints and service endpoints<\/h2>\n<p>A service endpoint extends the identity of a supported Azure subnet to a supported platform service and routes that service traffic through the Azure backbone. The service does not gain a network interface with a private IP in your virtual network.<\/p>\n<p>After enabling the endpoint on the subnet, configure the target service&#8217;s virtual network access rule; enabling the subnet feature by itself does not grant a storage read or SQL query. Microsoft explains the subnet, source-address and routing behavior in its <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/virtual-network\/virtual-network-service-endpoints-overview\" rel=\"nofollow\">service endpoints documentation<\/a>.<\/p>\n<p>A private endpoint is a private network interface in a chosen VNet that connects through Private Link to a specific supported service resource. The client must resolve the intended service hostname to the appropriate private address, have a valid route to it and still satisfy the target service&#8217;s authentication and authorization rules. Private endpoint approval does not automatically configure every corporate DNS resolver or remove every public-access path. Consult the target service&#8217;s own network and DNS requirements before restricting public access.<\/p>\n<p>Consider an Azure VM that must read from a restricted storage account. With a service endpoint, enable the supported service endpoint on the VM&#8217;s source subnet and allow that subnet in the storage network rules; test the actual client and data-plane identity.<\/p>\n<p>With a private endpoint, create or use the approved endpoint, make the application&#8217;s storage hostname resolve to its private IP and verify that the VM or connected on-premises client can route to that IP. A VPN or ExpressRoute connection may support private-endpoint access from on premises when routing and DNS are designed for it; an Azure service endpoint is not an on-premises subnet setting.<\/p>\n<p>When the connection fails, capture DNS output, source IP and subnet, target IP, account networking configuration and service authorization error independently. If the client still resolves the public service address in a private-endpoint design, adding broader storage permissions will not fix the wrong network path. Conversely, correct private DNS does not authorize a missing Blob Data Reader or Writer role. Choose the endpoint model for the required network boundary, then prove both network reachability and data access with separate tests.<\/p>\n<p><a href=\"https:\/\/www.exam-topics.com\/blog\/microsoft-az-104-azure-private-endpoints-and-private-dns\/\">Private DNS resolution<\/a> determines whether the client selects the intended private service address. Check service DNS, route, account firewall and authorization separately. A successful private endpoint approval does not update every enterprise resolver automatically.<\/p>\n<h2>Run a packet-path diagnostic without broadening access<\/h2>\n<p>In a disposable two-tier network, test three flows separately: permitted HTTPS from web to API, deliberately denied RDP or SSH from an ordinary workstation, and authorized administration through a correctly configured Azure Bastion instance. For each flow record source and destination NIC, private IP, protocol and port, subnet and NIC-level NSG rules, effective route, and observed result. A broad early allow rule can override an intended later deny; a correct allow cannot create a missing route or make a stopped service listen.<\/p>\n<p>When Bastion fails, confirm its supported deployment\/subnet configuration, the operator&#8217;s Azure resource permissions, permitted path to the VM and actual guest credentials. Do not expose public RDP or SSH just to bypass an uninvestigated Bastion issue. For a broken API call, use effective security rules and next-hop diagnostics to distinguish an NSG decision from a user-defined route to an unavailable appliance. An application HTTP 403 after the network connection succeeds is also different from an NSG timeout.<\/p>\n<p>Include egress in the same test plan. A subnet can have an appropriate outbound NSG rule and still lack a usable internet egress path, particularly where private subnet defaults apply. Inspect the actual VNet\/subnet configuration, route and explicitly supported NAT or other outbound method rather than assuming a public address is assigned by default. Retest permitted and prohibited flows after each targeted correction and preserve the diagnostic record as evidence for the change.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Troubleshoot Azure NSG priority, ASG membership, effective security rules, route tables, UDRs, private endpoints, and Azure Bastion.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[341,2],"tags":[],"et_vendor":[],"et_program":[],"et_certification":[],"et_exam":[],"et_topic":[],"class_list":["post-4006","post","type-post","status-publish","format-standard","hentry","category-microsoft-az-104","category-post"],"_links":{"self":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts\/4006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/comments?post=4006"}],"version-history":[{"count":11,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts\/4006\/revisions"}],"predecessor-version":[{"id":5804,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/posts\/4006\/revisions\/5804"}],"wp:attachment":[{"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/media?parent=4006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/categories?post=4006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/tags?post=4006"},{"taxonomy":"et_vendor","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_vendor?post=4006"},{"taxonomy":"et_program","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_program?post=4006"},{"taxonomy":"et_certification","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_certification?post=4006"},{"taxonomy":"et_exam","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_exam?post=4006"},{"taxonomy":"et_topic","embeddable":true,"href":"https:\/\/www.exam-topics.com\/blog\/wp-json\/wp\/v2\/et_topic?post=4006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}