Azure network segmentation means dividing your cloud network into small, isolated zones and controlling what may cross between them. For a small or midsize business, the workable answer is a short list: one virtual network (VNet) per application or environment, one subnet per tier, a network security group (NSG) with default-deny rules on every subnet, and a hub-and-spoke layout once you run more than one workload. Add Azure Firewall when you need to filter outbound traffic by domain name, not before.
Most of the pain comes from skipping this early. Azure lets resources in different subnets of the same VNet talk to each other freely, so a flat network is the default, not the safe choice. This guide walks through the design in the order you would build it, with the mistakes that cost money later.
TL;DR
- Segmentation limits lateral movement: if one server or account is compromised, the attacker cannot reach everything else.
- Subnets do not isolate anything by themselves. Traffic between subnets in one VNet is allowed by default until you attach NSGs.
- Put a default-deny NSG on every subnet, then open only the ports each tier needs from the tier in front of it.
- Use hub-and-spoke once you have two or more workloads: shared services in the hub, each workload in its own spoke, and a firewall route in between.
- Plan address space first. Overlapping ranges and undersized subnets are the hardest things to fix on a live network.
Table of Contents
- What segmentation does in Azure, and why it matters
- The building blocks: VNets, subnets and NSGs
- Decide your segments before you click anything
- Plan address space first
- Hub-and-spoke: when one VNet stops being enough
- Controlling traffic between and out of segments
- NSGs only, micro-segmentation or Azure Firewall?
- A rollout order that does not break production
- Our perspective
- Getting a segmentation plan without a network team
- FAQ
- Sources
What segmentation does in Azure, and why it matters
Microsoft's Well-Architected Framework describes network segmentation as dividing a network into small, isolated segments with security controls at the boundaries, so resources are protected from hostile networks such as the internet. Its segmentation guidance names three controls:
- Perimeter: the entry edge, where access is blocked unless explicitly allowed.
- Containment: the exit edge, which prevents lateral movement by allowing only expected traffic patterns.
- Isolation: grouping things with similar needs together, such as one workload per subscription.
The reasoning is "assume breach." Microsoft's Zero Trust segmentation guidance says segmentation gives you security boundaries that stop an attacker from moving across environments and doing more damage. For an owner, the practical meaning is simple. A stolen password on a test server should not give anyone a route to your customer database.
Segmentation also does not replace identity controls. The same Microsoft guidance treats network perimeters as an addition to identity, never a substitute. If you are tightening both, our Zero Trust for SMBs guide covers the identity side.
The building blocks: VNets, subnets and NSGs
A VNet is an isolated private network in Azure. Subnets are IP ranges inside it that you use to separate workload components, attach NSGs and attach route tables, according to Microsoft's subnet design guide.
Two defaults surprise people:
- Different VNets cannot talk by default. A VNet is a trust boundary. Traffic crosses only if you connect them through peering, VPN or ExpressRoute, per the Zero Trust segmentation guidance.
- Subnets inside one VNet can talk freely. Microsoft's virtual network overview states there are no security boundaries between subnets by default. A subnet is a unit of organization until an NSG makes it a boundary.
How NSGs decide
An NSG is a stateful list of allow and deny rules. Each rule has a priority, protocol, port range, address prefix and an allow or deny action, and every NSG comes with default rules you cannot delete, per the same overview.
Order matters when you attach NSGs at both the subnet and the network interface (NIC). Microsoft's NSG documentation says inbound traffic is checked against the subnet NSG first and then the NIC NSG, so both must allow a port. Outbound is reversed: NIC first, then subnet. A deny at either level blocks the flow. If a rule "looks right" but traffic fails, check the second NSG before anything else.
One rule to avoid: Microsoft's network security best practices warn against allow rules covering huge ranges such as 0.0.0.0 to 255.255.255.255, which red teams frequently find and exploit. Use service tags, application security groups (ASGs, which let you write rules against named groups of VMs instead of IP addresses) or specific prefixes.
Decide your segments before you click anything
The first design question is what deserves its own boundary. Microsoft's subnet design guide recommends one VNet per application and one subnet per component, such as web, application and data tiers. A data subnet, for example, can accept inbound traffic only from the application subnet.
The Microsoft cloud security benchmark goes further for higher-risk workloads. Anything that stores or processes highly sensitive data, faces the public internet, or carries unremediated vulnerabilities belongs in an isolated virtual network, with subnets segmenting further inside it.
For a typical SMB, that translates into a short sorting exercise:
| Question | If yes | Typical result |
|---|---|---|
| Does it face the internet? | Treat as high risk | Its own VNet or spoke, with a front door (such as Application Gateway) in front |
| Does it hold regulated or customer data? | Treat as high risk | Isolated spoke, data subnet reachable only from the app tier |
| Is it production versus test? | Separate by environment | Separate spokes, ideally separate subscriptions |
| Is it shared plumbing (DNS, gateway, bastion)? | Centralize | Hub VNet |
Grouping by environment is the cheapest win. A dev subnet that can reach production data is the most common flat-network mistake we see in assessment-style reviews of small Azure estates, and the fix is a boundary, not new software.
Plan address space first
Address planning is dull and unforgiving. Microsoft's secure hub-spoke design guide notes that in a single flat VNet, overlapping CIDR ranges block later peering, and changing address ranges on a live workload often means redeploying it. The subnet guide recommends non-overlapping address space, headroom in every subnet and NSGs on all of them.
Know these facts before you size anything, all from that same subnet guide:
- Azure reserves five IP addresses in every subnet (the first four and the last), so a /24 gives 251 usable addresses.
- Azure Firewall needs at least a /26 in a subnet named AzureFirewallSubnet.
- VPN Gateway needs at least a /27 in GatewaySubnet.
- Azure Bastion needs a /26 for deployments created after November 2021.
- Application Gateway v2 is recommended at /24.
The hub-and-spoke guide adds a /28 for each Private DNS Resolver endpoint, and Microsoft's hub-and-spoke design principles suggest allocating 32 addresses to the GatewaySubnet to avoid hitting gateway size limits later.
An illustrative address plan
This is an example layout, not a Microsoft template. Adjust it to your own ranges and never reuse a range already used on-premises or by a partner network.
| Network | Range | Purpose |
|---|---|---|
| Hub VNet | 10.0.0.0/22 | Shared services |
| Spoke: production app | 10.1.0.0/20 | Web, app and data subnets |
| Spoke: test | 10.2.0.0/20 | Non-production |
| Reserved | 10.3.0.0/16 and up | Future spokes |
Leave whole blocks unassigned. Growth is the one certainty, and unallocated space costs nothing.
Hub-and-spoke: when one VNet stops being enough
Microsoft's hub-and-spoke guide describes the hub as the home for shared services: Azure Firewall, a VPN or ExpressRoute gateway, Azure Bastion and optional Private DNS Resolver endpoints. Each spoke holds a workload and peers with the hub. Because VNet peering is non-transitive, spokes are isolated from each other by default, as the design principles repository explains.
That is the pattern behind the many searches for "hub and spoke Azure," and it is less heavy than it sounds. The secure hub-spoke guide says the minimal version adds only one extra VNet and one peering connection, with complexity roughly equal to one more NSG. It also lists what you avoid: duplicated Bastion and DNS in every workload, and a single shared network boundary where one compromise has wider impact.
What goes where
- Hub: firewall (if you use one), gateway to your office or data center, Bastion for administrator access, DNS.
- Spokes: one workload each, with its own subnets and NSGs.
- Not in the hub: application servers. Keep the hub boring so that few people need rights to change it.
If on-premises routes arrive over ExpressRoute, they populate only the hub unless you enable Allow Gateway Transit on the hub peering and Use Remote Gateway on the spoke peering. That setting is a frequent reason a spoke "cannot see" the office network.
Administrator access to the hub is a boundary too. Opening RDP or SSH to the internet undoes your segmentation, so see our guide to Azure JIT access for time-limited VM ports.
Controlling traffic between and out of segments
Default-deny on every subnet
The secure hub-spoke guide prescribes default-deny NSGs on every subnet in both hub and spoke. Its web application example shows the shape:
- The Application Gateway subnet allows inbound HTTPS on 443 from the internet, plus ports 65200 to 65535 from the GatewayManager service tag and traffic from the AzureLoadBalancer tag.
- The workload subnet allows inbound traffic only from the Application Gateway subnet, on the application port, and denies everything else inbound.
That is least privilege in practice. Microsoft's networking guidance says that if a segment is not routable, it cannot be accessed, so start narrow and widen only for segments that must communicate.
Routing spoke traffic through a firewall
Where you need inspection, the hub-and-spoke guide applies a user-defined route (UDR) with 0.0.0.0/0 pointing at the hub firewall's private IP on spoke subnets. A packet from Spoke A to Spoke B then crosses the Spoke A peering, is checked against firewall rules, crosses the Spoke B peering, and returns the same way. A firewall rule can then allow narrow flows, for example 10.1.0.0/16 to 10.2.0.0/16 on ports 443 and 1433 only.

Egress is half the job
Inbound rules get the attention, but containment depends on outbound control. Microsoft's guidance says NSG outbound rules limited to known Azure service destinations are enough for most regional web apps, and that Azure Firewall belongs in the hub when you need FQDN-based filtering (allowing by domain name, such as a specific SaaS vendor). Egress design also drives your bill, since data leaving Azure is charged: see Azure egress costs before choosing a topology that sends everything through one inspection point.
NSGs only, micro-segmentation or Azure Firewall?
Microsoft's baseline is NSGs on every subnet, with Azure Firewall optional until you need FQDN-based outbound control. Stricter Zero Trust designs place the firewall inline for packet inspection. Use this as a decision aid:
| Situation | Reasonable design |
|---|---|
| One or two workloads, no domain-based egress rules | Separate VNets or subnets, default-deny NSGs |
| Several workloads, shared admin access | Hub-and-spoke, Bastion in the hub, NSGs everywhere |
| Need to allow outbound by domain, or log spoke-to-spoke flows centrally | Add Azure Firewall in the hub with a 0.0.0.0/0 UDR |
| Regulated data or an auditor asking for lateral-movement controls | Dedicated spoke, tight NSG and ASG rules, firewall inspection between spokes |
Microsoft's training module on segmenting workloads frames the goal as limiting lateral movement with NSGs, ASGs, Azure Virtual Network Manager security admin rules, and Network Watcher to verify the effective rules. Virtual Network Manager matters once you have many VNets across subscriptions, because it lets you define network groups that control which VNets can communicate.
Isolation is not only a network concern. When a sensitive application mixes users and data across teams, a logical boundary inside the application matters as well, as in this walkthrough of workspace isolation for shared hiring data.
A rollout order that does not break production
You rarely get to build from scratch. For an existing flat network, this order limits risk:
- Inventory. List every VNet, subnet, NSG and peering, and which workloads sit where. Flag anything internet-facing or holding sensitive data.
- Turn on logging first. Microsoft's secure hub-spoke guide directs teams to enable VNet flow logs and move off NSG flow logs before those retire on September 30, 2027. Watching real traffic tells you which rules you can safely tighten.
- Attach NSGs to every subnet with rules that mirror current traffic, then remove broad rules one at a time.
- Separate environments. Move test and development out of the production network.
- Isolate the highest-risk workload into its own VNet or spoke, following the benchmark criteria above.
- Add the hub when a second workload needs the same gateway, Bastion or DNS.
- Introduce firewall routing only where a named requirement exists, and test the UDR on one spoke first.
- Verify. Use Network Watcher to check effective rules, and repeat after any change.
Two failure patterns to watch: a UDR that sends traffic to a firewall that has no allow rule (everything silently stops), and an NSG added at the NIC level that nobody remembers, which blocks traffic the subnet NSG allows.
Segmentation is one of the structural tests in our cloud architecture checklist, and it pairs with a review of who can change these rules, covered in our Azure least privilege checklist.
Our perspective
Most small companies we talk to did not design their Azure network. It grew one project at a time, and the segmentation question only comes up after an audit, an insurance questionnaire or an incident.
Our approach is to rank the work by risk and cost, not by what is fashionable. Separating production from test and isolating the one internet-facing or data-heavy workload deliver most of the benefit, and they usually come before a firewall or any new tooling.
We also think the plan should belong to you. A written, plain-language roadmap that your own team can read, with the reasoning behind each boundary, is worth more than a diagram only the consultant understands. That is how we structure our work: a free technology assessment first, then a prioritized plan you own, then delivery and ongoing operation if you want it.
Changes to a live network need rollback plans and checkpoints where a person approves the step. We build that into cloud work from day one.
jaras
Getting a segmentation plan without a network team
If you have no in-house network engineer, the risk is not the technology but the sequencing: address plans, peering, routes and NSG rules all depend on each other. Our Cloud & Training work covers cloud architecture and cost optimization, including reviewing how your Azure environment is laid out and what it costs, and our engagements begin with a free technology assessment that produces a prioritized plan you own.

If you want a second set of eyes on your Azure layout before you change anything, book a 30-minute call and bring a list of your subscriptions and VNets.
FAQ
What does a network security group do in Azure?
An NSG filters traffic to and from Azure resources in a VNet using allow and deny rules with priorities, ports, protocols and address prefixes. You can attach it to a subnet, a network interface or both. For inbound traffic, the subnet NSG is evaluated first, then the NIC NSG, so both must permit the flow.
Are subnets enough to segment an Azure network?
No. Resources in different subnets of the same VNet can communicate by default, so a subnet becomes a security boundary only when you add an NSG or route traffic through a firewall. Use separate VNets for workloads with different risk levels, such as production and test.
What is a three-tier architecture in Azure?
It splits an application into web, application and data tiers, each in its own subnet. The usual rule is that the web tier accepts internet traffic through a front end, the app tier accepts traffic only from the web tier, and the data tier accepts traffic only from the app tier.
Do I need Azure Firewall for a small environment?
Not always. Microsoft's baseline is NSGs on every subnet, with Azure Firewall added when you need FQDN-based outbound filtering or central inspection of spoke-to-spoke traffic. Plan a /26 AzureFirewallSubnet in the hub so the option stays open.
Can I change subnet or address ranges later?
It is possible but disruptive. Microsoft notes that retrofitting address ranges on a live workload often requires redeployment, and overlapping ranges block peering. Allocate non-overlapping ranges and leave spare blocks from the start.
Sources
- Architecture strategies for networking and connectivity (Microsoft Learn)
- Architecture strategies for building a segmentation strategy (Microsoft Learn)
- Apply Zero Trust principles to segmenting Azure-based networks (Microsoft Learn)
- Azure virtual networks and subnets (Microsoft Learn)
- Virtual networks and virtual machines in Azure (Microsoft Learn)
- How network security groups filter network traffic (Microsoft Learn)
- Azure network security best practices (Microsoft Learn)
- Microsoft cloud security benchmark: Network Security (Microsoft Learn)
- Hub-and-spoke network topology (Microsoft Learn)
- Design a secure hub-spoke network for regional web applications (Microsoft Learn)
- Common design principles for a hub-and-spoke VNet architecture (Microsoft, GitHub)
- Segment and isolate Azure workloads using network security controls (Microsoft Learn)
