Homeβ€Ί Blogβ€Ί Azure Architecture Series #104 β€” Network Segmentation Patterns for Regulated Workloads…
Azure Architecture Azure Architecture Series

Azure Architecture Series #104 β€” Network Segmentation Patterns for Regulated Workloads

Verified against current vendor documentation on 26 November 2026. Pricing, limits and API behaviour were checked against the official docs on that date. Cloud services change fast — if you are reading this much later, treat the specifics as a starting point and re-check the linked sources.

Business Challenge

#103 ended on evidence: flow logs are the record of what actually talked to what. This post is the control that evidence is supposed to demonstrate, and the reason it needs its own post is that segmentation in Azure is not one mechanism. It is three, owned by different people, and an auditor's question is almost never “is there a rule?” It is “who could remove that rule, and would anyone know?”

Start from the default, because the default is the thing a design has to overcome. Every network security group Azure creates carries AllowVNetInBound at priority 65000 and AllowVnetOutBound at 65000, with DenyAllInbound and DenyAllOutBound only at 65500. Those cannot be removed, only overridden by higher-priority rules.

A virtual network is flat until somebody makes it otherwise

The VirtualNetwork service tag covers the whole address space, including peered networks. So the shipped default is that everything inside can reach everything else inside, on every port, in both directions. Segmentation is not a tightening of Azure's defaults — it is a reversal of them.

And the inherited AllowInternetOutBound at 65001 means unrestricted egress is also the default, which is the half most compliance regimes care about most.

The documentation is unusually honest about why the obvious answer — have the central team own all the NSGs — does not work: “operational overhead is high as admins need to manage each NSG, as the number of NSGs increases, the burden increases.” And the opposite, letting teams own them, means “the central governance team can't enforce critical security rules, such as blocking risky ports”, with teams that “might also misconfigure or forget to attach NSGs.” Even the middle road fails: NSGs created by Azure Policy still leave the position that “the central governance team still can't enforce the standard security rules, since NSG owners in teams can still modify them.”

Architecture

Diagram: network segmentation for regulated workloads across four bands. The first band sets out three enforcement layers and who holds the pen at each. Security admin rules belong to a central governance team, apply at the virtual network, use priorities from one to four thousand and ninety-six, cannot be edited by application teams, and offer three actions: Allow, Always Allow and Deny. Network security groups belong to individual application teams, apply at the subnet and the network interface, use priorities from one hundred to four thousand and ninety-six, are stateful, and offer only Allow and Deny. A network security perimeter belongs to the platform or security team, covers platform services deployed outside the virtual network, denies by default in enforced mode, and admits inbound traffic by address, subscription or service tag and outbound traffic by fully qualified domain name. The band notes that a network security group is the only layer whose owner can also remove it, which is the argument for the other two, and that the defaults every group inherits are AllowVNetInBound at sixty-five thousand, AllowAzureLoadBalancerInBound at sixty-five thousand and one, and DenyAllInbound at sixty-five thousand five hundred, so every virtual network is flat by default and network-to-network traffic is permitted until somebody writes a rule. The second band is the evaluation order and which actions end it: a security admin rule is evaluated first, then network security group rules but only if the admin action was Allow, then the resource itself on a five-tuple with a stateful flow record. Allow continues to the group, so a team can still refuse the traffic, and is the only action that delegates. Always Allow terminates evaluation and goes straight to the resource, bypassing every group. Deny terminates evaluation and nothing downstream can re-admit the traffic. Exceptions are expressed as priority rather than scope: deny SSH everywhere at priority one hundred and allow it for one network group at priority ten. The third band covers the perimeter, the layer for everything that has no subnet. Transition mode is the default, learns access patterns and enforces nothing. Enforced mode denies all public traffic while intra-perimeter traffic and private endpoints still flow. The scale ceiling is one hundred perimeters, two hundred profiles each, and two hundred inbound plus two hundred outbound rule elements. Access logs provide the audit evidence, and the workspace must sit in the same perimeter. The band warns that a perimeter left in the default mode is a reporting tool rather than a control, with nothing to tell you it is not enforcing, and that shared access signature tokens are rejected on intra-perimeter and subscription-based inbound rules. The fourth band lists what none of the three layers reaches: virtual networks containing SQL Managed Instance or Databricks, which security admin rules skip entirely; subnets containing Application Gateway, Bastion, Firewall, Route Server, VPN Gateway, Virtual WAN or ExpressRoute Gateway; private endpoints, to which security admin rules do not currently apply; platform traffic on 168.63.129.16 and 169.254.169.254, which bypasses network security groups unless the platform service tags are used; and those very tags, AzurePlatformDNS, IMDS and LKM, which security admin rules do not support. It closes by noting that rules reach new resources on an eventual consistency model, so a virtual machine is briefly unprotected after it appears, and that only one security admin configuration is allowed per region, so rule collections stack inside it rather than configurations beside it.
Segmentation is a question of who holds the pen, and three layers answer it differently.

Three layers, three owners

Rule typeTarget audienceApplied onEvaluation orderAction types
Security admin rulesNetwork admins, central governance teamVirtual networksHigher priorityAllow, Deny, Always Allow
Network security group rulesIndividual teamsSubnets, NICsLower priority, after security admin rulesAllow, Deny
Network security perimeterPlatform or security teamPaaS resources outside any virtual networkIndependent — a different planeAllow rules against a deny-by-default

The first two rows are Microsoft's own comparison; the third is the one people forget, and it covers the resources that have no subnet to attach an NSG to. That split is the whole design: an NSG is the only layer whose owner can also delete it, which is precisely why a regulated workload cannot rest on NSGs alone.

Why This Architecture Holds Up

Because two of the three actions end the conversation

Security admin rules are evaluated before NSGs, and what happens next depends entirely on which of three actions fired:

ActionWhat happensCan a team override it?
Allow“Evaluated first, followed by network security group rules” — so the NSG still gets a sayYes — a team can still deny it
Always AllowTraffic “goes directly to the resource and terminates further (and possibly conflicting) evaluation by NSG rules”No — every NSG is bypassed
Deny“The traffic stops without being delivered to the destination”No — nothing can re-admit it

Allow is the only action that delegates. That makes it the right default for a guard rail you want teams to be able to tighten but not loosen. Always Allow is the dangerous one, and not because it is permissive — because it is permissive past a control an application team believes they own. A team that writes a deny rule and watches traffic arrive anyway has no local way to discover why.

For a regulated workload, that is an argument for writing down which rules are Always Allow and why, as a short, reviewed list. It is the only mechanism in Azure networking that silently defeats a correctly written NSG.

Because exceptions are expressed as priority, not as scope

The documented pattern for “block SSH everywhere except for one team” is instructive, because it is not what most people reach for. You do not scope the deny rule to exclude the exception. You write both rules and let priority settle it: a rule denying inbound SSH for the ALL network group at priority 100, and a rule allowing inbound SSH for the App network group at priority 10. “Because 10 is smaller than 100, the allow rule for the App network group is evaluated before the deny rule that applies to every virtual network.”

Two consequences follow, and both are good for an audit. The deny rule stays universal in its text, so nobody has to maintain an exclusion list inside it. And the exception is a separate, higher-priority object with its own name, scope and history — so “show me every exception to the SSH policy” is a query rather than an archaeology exercise. Priority ranges from 1 to 4,096, so there is plenty of room to reserve bands by purpose.

One constraint shapes how you lay this out: “You can deploy only one security admin configuration to a region.” The documented remedy is to create multiple rule collections inside one configuration rather than multiple configurations. So the configuration is a singleton per region and the rule collection is your unit of organisation.

Because the perimeter covers what has no subnet — and ships switched off

Network security perimeter is the newer piece and the one that closes the real gap: a Key Vault, a storage account or a Log Analytics workspace lives outside your virtual network, so there is no NIC to attach an NSG to. The perimeter “creates logical network boundaries around your platform-as-a-service (PaaS) resources”, and in enforced mode denies all public traffic by default while leaving intra-perimeter traffic and private endpoints flowing without explicit rules. It reached general availability across all Azure public cloud regions plus five Government regions.

Transition mode is the default, and it enforces nothing

The two access modes are transition mode — “formerly Learning mode”, the “default access mode”, which “helps network administrators understand the existing access patterns” — and enforced mode, which is “set by the administrator”.

So a perimeter created and populated and never switched over is a reporting tool wearing the name of a control. The resources are associated, the rules are written, the portal looks complete, and nothing is being blocked. If your evidence pack says “PaaS resources are inside a network security perimeter”, the sentence that matters is the one naming the mode.

Three more things to settle before enforced mode, because each one is discovered painfully:

  • SAS tokens stop working on two paths. “Intra-perimeter traffic and inbound access rules that are subscription-based don't support authentication via shared access signature (SAS) token” — such requests “are rejected and display an authentication error.” Any component authenticating to storage with a SAS has to move to another method first. This is the same class of surprise as the packet-capture SAS dependency in #102.
  • Sentinel and Backup are exclusions, not hurdles. Perimeters “aren't supported for Log Analytics workspaces enabled for Microsoft Sentinel”, and enabling one “automatically disables analytic rules” — a segmentation control that silently turns off your detections. Likewise “Azure Backup isn't supported for Storage Accounts enabled with network security perimeter.”
  • Names have to be short. Associations are named {resourceName}-{perimeter-guid} against an 80-character ceiling, so “resources names would have to be limited to 44 characters” — a naming-standard change, discovered at association time.

The scale ceilings are generous but worth knowing before designing a profile-per-application scheme: 100 perimeters per subscription and 200 profiles per perimeter as recommended limits — 20,000 profiles in total — with a hard limit of 200 rule elements inbound and 200 outbound per profile, so 400 in all, and 1,000 associated PaaS resources per perimeter.

Because the gaps are specific, and an auditor will find them

This is the part that belongs in a design document rather than being quietly hoped over. Security admin rules do not reach everything, and the exclusions are named:

WhatScope of the gap
Azure SQL Managed Instance, Azure DatabricksRules “skip this virtual network” entirely — a form exists to request application
App Gateway, Bastion, Firewall, Route Server, VPN Gateway, Virtual WAN, ExpressRoute GatewayRules don't apply at the subnet level; other subnets in the same VNet are unaffected
Private endpoints“Security admin rules don't apply to private endpoints that fall under the scope of a managed virtual network”
Platform traffic on 168.63.129.16 and 169.254.169.254DHCP, DNS, IMDS and health monitoring “aren't subject to the configured network security groups” by default
AzurePlatformDNS, AzurePlatformIMDS, AzurePlatformLKMThe tags that would let you block platform traffic are the three security admin rules don't support

That last row is the sharpest, and it is a genuine asymmetry: those three service tags exist so an NSG can deny platform DNS, IMDS and licensing traffic — and security admin rules, the layer a central team cannot have overridden, cannot express them. If blocking IMDS is a requirement, it has to live in an NSG, which means it lives somewhere a team can remove.

There is also a partial exclusion worth designing around rather than fighting: for a virtual network containing one of the network-intent-policy services, setting AllowRulesOnly means “only Allow rules in your security configuration are applied to this virtual network” while “Deny rules aren't applied.” Half a guard rail, declared deliberately, beats a full one you believe in wrongly. And where two network managers disagree on that setting, “the setting of the network manager instance with the highest scope is used.”

Because enforcement is eventually consistent

“When you deploy security admin rules, the eventual consistency model is used… If you add resources to a virtual network that has security admin rules applied, those resources eventually receive the same security admin rules with a delay.”

The guarantee is strong and it is not instantaneous. A newly created VM is covered shortly after it appears, which for most estates is fine and for a few is a finding. If the control has to hold at the instant of creation, the NSG on the subnet is the thing that does it — subnet NSGs apply to a NIC the moment it joins. The two layers are complementary here rather than redundant: the NSG covers the first seconds, the security admin rule covers the lifetime and the forgetfulness.

One related NSG behaviour matters during a tightening exercise: “New or updated rules in a network security group apply exclusively to new connections, leaving existing connections unaffected.” Deploying a deny rule does not sever what is already established — so a segmentation cutover does not prove itself until the existing sessions turn over, and the flow logs from #103 are how you confirm it actually happened.

Key Architecture Decisions

DecisionDo thisBecause
Baseline deny for high-risk portsSecurity admin rule, not Azure PolicyPolicy-created NSGs can still be modified by their owners; admin rules cannot.
Default action for a guard railDeny for prohibitions, Allow for permissionsAllow is the only action that lets a team tighten further.
Reaching for Always AllowKeep a short reviewed list of themIt is the one mechanism that silently defeats a correct NSG.
Granting an exceptionHigher-priority rule on a narrower network groupThe universal deny keeps its text; the exception becomes an auditable object.
Organising rules in a regionRule collections inside one configurationOnly one security admin configuration can be deployed per region.
PaaS with no subnetNetwork security perimeterThere is no NIC to attach an NSG to; the perimeter is the only equivalent.
New perimeterTransition mode first, then switchTransition is the default and enforces nothing; nothing warns you.
Anything authenticating with a SAS tokenChange the auth method before enforced modeSAS is rejected on intra-perimeter and subscription-based inbound rules.
Sentinel workspace, or a backed-up storage accountKeep it out of the perimeterA perimeter disables Sentinel analytic rules; Backup is unsupported.
Blocking IMDS or platform DNSNSG, and accept the ownership riskSecurity admin rules don't support the three AzurePlatform service tags.
VNet with SQL MI or DatabricksDeclare it, consider AllowRulesOnlyRules otherwise skip the whole virtual network; half a rail, stated, beats a false one.
Control must hold at instant of creationSubnet NSG as wellSecurity admin rules reach new resources on an eventual consistency model.
Proving a cutover workedFlow logs, after sessions turn overNew NSG rules don't sever established connections.

Closing Thought

Every segmentation discussion I have been in eventually turns into an argument about trust, dressed up as an argument about rules. The central team does not trust application teams to keep a deny rule; the application teams do not trust a rule they cannot see or change. Azure's answer is not to pick a winner. It is to give the two groups different objects with a fixed precedence between them, so the guard rail and the local tuning can both be true at once.

What makes that work for a regulated workload is not the enforcement. It is that the layers are legible: a deny is at a known priority, an exception is a named higher-priority rule, an Always Allow is a short list somebody signed, and a perimeter's mode is a field you can read. The control you can describe in one sentence to an auditor is worth more than the stricter one nobody can explain.

The one line to take away

Write prohibitions as Deny security admin rules and permissions as Allow, keep Always Allow rare and reviewed, and never leave a network security perimeter in the mode it was created in.

Next in the series: Bastion — SKUs, the native client, and shareable links. Which is the same theme at a smaller scale: how administrative access gets in once the segmentation holds.

Official Azure Reference

Comments

How was your experience?
Your feedback helps improve this site.
PoorExcellent