azure-network-security-design
Skill175 starsChanged 6 months agoMITView on GitHub
Guidance for designing secure Azure network architecture — hub-spoke topology (or Virtual WAN), segmentation with NSGs/ASGs, private endpoints / Private Link for PaaS, egress through Azure Firewall, DDoS protection, WAF on Front Door/App Gateway, and centralised private DNS. Aligned to the Zero Trust network pillar. WHEN: Azure network security, hub spoke, Virtual WAN, network segmentation, NSG ASG design, private endpoint, Private Link, DDoS protection, secure virtual network, egress control, Zero Trust network, private connectivity design, Bastion, JIT VM access. DO NOT USE for the firewall itself (use azure-firewall), VM-level hardening (use defender-for-cloud-hardening), or Key Vault networking only (use azure-key-vault).
In this repository87 other files it gives its agents.
- agent-identity-governanceSkill
- api-security-designSkill
- azure-ai-content-safetySkill
- azure-app-service-securitySkill
- azure-arcSkill
- azure-bastion-jitSkill
- azure-confidential-computingSkill
- azure-ddos-protectionSkill
- azure-firewallSkill
- azure-key-vaultSkill
- azure-monitor-securitySkill
- azure-pimSkill
- azure-policySkill
- azure-pricingSkill
- azure-role-selectorSkill
- azure-security-benchmarkSkill
- azure-site-recoverySkill
- azure-wafSkill
- bitlocker-designSkill
- cloud-app-security-postureSkill
- compliance-managerSkill
- compromise-recoverySkill
- conditional-access-mfaSkill
- copilot-for-m365-readinessSkill
- defender-easmSkill
- defender-for-apisSkill
- defender-for-businessSkill
- defender-for-cloud-aiSkill
- defender-for-cloud-appsSkill
- defender-for-cloud-hardeningSkill
- defender-for-containersSkill
- defender-for-endpointSkill
- defender-for-identitySkill
- defender-for-iotSkill
- defender-for-office-365Skill
- defender-for-serversSkill
- defender-for-storageSkill
- defender-tvmSkill
- defender-xdrSkill
- entra-external-idSkill
- entra-global-secure-accessSkill
- entra-id-governanceSkill
- entra-id-protectionSkill
- entra-idSkill
- entra-permissions-managementSkill
- entra-verified-idSkill
- entra-workload-identitySkill
- iac-securitySkill
- insider-risk-baselineSkill
- intune-app-protectionSkill
- intune-device-mgmtSkill
- m365-govern-manageSkill
- m365-oversharingSkill
- macos-intune-baselineSkill
- microsoft-agent-365Skill
- microsoft-privaSkill
- passkeys-fido2Skill
- paw-designSkill
- pki-designSkill
- purview-advanced-dlpSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 73
Use Azure Bastion (in the hub) or Defender for Cloud just-in-time VM access.
- Distinctive: line 97
"Each spoke has its own egress public IP": - No central inspection, no egress logging.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Azure Network Security Design
Secure Azure networking applies Zero Trust to the network pillar: segment, control traffic explicitly, prefer private connectivity, and inspect / filter egress, assuming the network is hostile. The output is a hub-spoke (or Virtual WAN) topology with NSG microsegmentation, private endpoints, and a single controlled egress path.
When to use
Designing the network topology and controls for an Azure landing zone or workload. Use this skill to pick topology, design segmentation, and place controls.
Do not use this skill for the firewall product itself (azure-firewall), VM hardening
(defender-for-cloud-hardening), or single-service networking (azure-key-vault).
Pick the topology
| Estate shape | Topology | Notes |
| Single region, few subscriptions | Hub-spoke (single region) | Default for most |
| Multi-region with many spokes / branch sites | Virtual WAN | Microsoft-managed transit |
| Greenfield enterprise-scale | Azure Landing Zones (CAF) - VWAN or hub-spoke | Use CAF blueprints |
| Heavy on-prem + Azure | Hub-spoke + ExpressRoute / VPN gateway | Hub holds gateway + firewall |
| Small / single-workload | Single VNet, no hub | Don't over-engineer |
Rule of thumb: hub-spoke for most enterprises, Virtual WAN at multi-region branch scale. The hub holds shared services (firewall, gateway, DNS, Bastion); workloads sit in spokes. Don't put workloads in the hub.
Approach
- Topology and address plan — Pick hub-spoke or Virtual WAN. Allocate non-overlapping RFC 1918 ranges per region / spoke; reserve gateway subnet, firewall subnet, Bastion subnet in the hub. Verify: address plan documented; no overlap with on-prem ranges; no overlap between regions.
- Segmentation with NSGs and ASGs — NSG at subnet level (preferred over per-NIC). Group workloads with Application Security Groups (ASGs) instead of static IP lists - ASGs survive scale events. Microsegment by tier: web / app / data. Verify: NSG flow logs enabled to a Log Analytics workspace; default-deny rule present; ASGs used instead of IP-based source/dest for VM groups.
- Private endpoints for PaaS — Use Private Endpoints / Private Link for sensitive
PaaS (Storage, SQL, Key Vault, Cosmos DB). Traffic stays on Microsoft backbone. Disable
public network access on the PaaS resource itself.
Verify:
publicNetworkAccess = Disabledon the resource; private endpoint resolves to a private IP via private DNS zone. - Centralise egress through Azure Firewall — UDR on spokes:
0.0.0.0/0next hop = firewall private IP. All outbound goes through the firewall for FQDN filtering and logging. Verify: effective routes on a spoke NIC show next-hop = firewall; no spoke has its own public IP egress. - DDoS + WAF for public-facing — Enable Azure DDoS Network Protection on VNets with public IPs. Place public web apps behind Front Door or Application Gateway with WAF in Prevention mode. Verify: DDoS plan associated; WAF rules in Prevention (not Detection) for prod.
- Centralised DNS — Private DNS zones linked from the hub; spokes auto-resolve PaaS private endpoints via the zones. Don't let each spoke run its own DNS.
- Block management plane on the internet — No direct RDP / SSH from internet to VMs. Use Azure Bastion (in the hub) or Defender for Cloud just-in-time VM access. Verify: NSGs block 3389 / 22 from internet on all VM subnets; Bastion deployed in hub.
Guardrails
- Prefer private endpoints over service endpoints for sensitive PaaS data planes. Service endpoints leave the PaaS resource public; private endpoints make it truly private.
- Default-deny NSGs; document every allow rule's purpose. Allow lists drift to "allow everything" without discipline. Use ASGs + comments.
- Don't expose management ports (RDP/SSH) to the internet - use Bastion / just-in-time access. Internet-exposed 3389 / 22 = compromise within hours.
- DNS is part of network security. Untrusted DNS resolution undermines private endpoint isolation.
- DDoS Network Protection is per-VNet, billed monthly. Cheap insurance for public-facing VNets; don't blanket-enable on every VNet.
- NSG flow logs to a workspace. Without them, an incident has no network forensics.
Common anti-patterns
- "Workloads in the hub - it's just one VNet" - Hub holds shared services only. Workloads in spokes for blast radius.
- "Service endpoints because they're cheaper than private endpoints" - Service endpoint doesn't make the PaaS private; only the routing. Private endpoint for sensitive data.
- "NSG per NIC for every VM" - Unmanageable. Subnet NSGs + ASGs.
- "WAF in Detection forever" - Logs attacks; doesn't block them. Move to Prevention after tuning.
- "Each spoke has its own egress public IP" - No central inspection, no egress logging. Force through hub firewall.
- "Bastion later - we'll RDP through the VPN for now" - VPN credential theft = lateral movement. Bastion + JIT from day one.
Example prompts
Design a hub-and-spoke network with segmentation and private endpoints for an Azure landing zone.How do I apply Zero Trust principles to an Azure virtual network?Plan NSG and ASG rules plus DDoS protection for a secure VNet.Control egress traffic and private connectivity across spokes.Replace internet-exposed RDP with Bastion and just-in-time VM access.Should I use hub-spoke or Virtual WAN for our multi-region estate?
Microsoft Learn
- Network security best practices: https://learn.microsoft.com/azure/security/fundamentals/network-best-practices
- Hub-spoke topology: https://learn.microsoft.com/azure/architecture/networking/architecture/hub-spoke
- Virtual WAN: https://learn.microsoft.com/azure/virtual-wan/virtual-wan-about
- Private Link: https://learn.microsoft.com/azure/private-link/private-link-overview
- Zero Trust network: https://learn.microsoft.com/security/zero-trust/deploy/networks
- DDoS Protection: https://learn.microsoft.com/azure/ddos-protection/ddos-protection-overview
- Azure Bastion: https://learn.microsoft.com/azure/bastion/bastion-overview
- NSG flow logs: https://learn.microsoft.com/azure/network-watcher/network-watcher-nsg-flow-logging-overview
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

