Install
openclaw skills install azure-networking-auditAzure VNet networking audit covering address space design, NSG rule evaluation, Azure Firewall policy analysis, ExpressRoute and VPN Gateway connectivity, VNet Peering topology, and UDR validation using read-only Azure CLI commands.
openclaw skills install azure-networking-auditCloud resource audit for Azure Virtual Network (VNet) architecture, network security posture, and hybrid connectivity. This skill evaluates provider-specific Azure networking constructs — VNet design, NSG priority- based rules, Azure Firewall rule collection groups, ExpressRoute circuits, VNet Peering topology, UDR forced tunneling, and Application Gateway placement — not generic cloud networking advice.
Scope covers VNet-layer networking: address space planning, subnet
delegation, NSG filtering, Azure Firewall inspection, hybrid connectivity
via ExpressRoute and VPN Gateway, and route management. Out of scope:
Azure Front Door CDN policies, Azure WAF custom rule authoring,
application-layer routing in Application Gateway path rules, and Azure
DNS zone management. Reference references/cli-reference.md for read-only
Azure CLI commands organized by audit step, and references/vnet-architecture.md
for the VNet packet flow model, NSG evaluation order, and ExpressRoute
routing architecture.
az account show succeeds)Microsoft.Network/virtualNetworks/read, Microsoft.Network/networkSecurityGroups/read, Microsoft.Network/azureFirewalls/read, Microsoft.Network/expressRouteCircuits/read, Microsoft.Network/virtualNetworkGateways/read, Microsoft.Network/routeTables/read, Microsoft.Network/networkInterfaces/readaz account set per subscriptionFollow these six steps sequentially. Each step builds on prior findings, moving from inventory through security analysis to optimization.
Enumerate all VNets in the target subscription and assess architectural design.
az network vnet list --output table
az network vnet show --name <vnet-name> --resource-group <rg>
az network vnet subnet list --vnet-name <vnet-name> --resource-group <rg>
For each VNet, evaluate:
Microsoft.Sql/managedInstances, Microsoft.Web/serverFarms). Delegated subnets restrict which resources can deploy — a subnet delegated to SQL Managed Instance cannot host VMs or other services.Audit Network Security Groups using Azure's priority-based evaluation model.
az network nsg list --output table
az network nsg rule list --nsg-name <nsg-name> --resource-group <rg> --include-default --output table
NSG rules evaluate by priority (lowest number = highest priority, range 100–4096). First match wins.
* or the Internet service tag. SSH/RDP from Internet is Critical; HTTPS on an Application Gateway subnet may be acceptable. The Internet service tag covers all public IP space excluding VNet, peered VNet, and on-premises address ranges.az network nic show-effective-nsg to see the combined effective rules with resolved priorities. A rule allowed by subnet NSG but denied by NIC NSG is effectively denied.Evaluate Azure Firewall policies, rule collection groups, and threat intelligence.
az network firewall list --output table
az network firewall policy rule-collection-group list --policy-name <policy> --resource-group <rg>
* source/destination, wide port ranges).Evaluate hybrid and inter-VNet connectivity through ExpressRoute, VPN Gateway, and VNet Peering.
ExpressRoute:
az network express-route show --name <circuit> --resource-group <rg>
az network express-route peering list --circuit-name <circuit> --resource-group <rg>
az network express-route list-route-tables and Azure VNet routes are advertised back to on-premises. Missing routes cause silent traffic drops.VPN Gateway:
az network vpn-connection show --name <conn> --resource-group <rg>
VNet Peering:
az network vnet peering list --vnet-name <vnet> --resource-group <rg> --output table
AllowGatewayTransit on hub and UseRemoteGateways on spoke enable shared ExpressRoute/VPN. Verify settings match hub-spoke intent.AllowForwardedTraffic must be enabled on both peering links for transit routing through Azure Firewall in the hub.Audit User-Defined Routes for correctness, forced tunneling, and conflicts.
az network route-table list --output table
az network route-table route list --route-table-name <rt> --resource-group <rg>
az network nic show-effective-route-table --name <nic> --resource-group <rg>
0.0.0.0/0 next-hop to Azure Firewall or NVA force internet traffic through inspection. Verify forced tunneling is NOT applied to AzureFirewallSubnet, GatewaySubnet, or AzureBastionSubnet.az network nic show-effective-route-table for final effective routes.disableBgpRoutePropagation). When disabled, ExpressRoute/VPN routes are not injected. Verify this matches routing design.Compile findings and identify resource optimization opportunities.
az network nic list --query "[?virtualMachine==null]" --output table
az network public-ip list --query "[?ipConfiguration==null]" --output table
az advisor recommendation list --category Cost for networking optimization opportunities.Compile the findings report using the Report Template section.
| Finding | Severity | Rationale |
|---|---|---|
| NSG allows SSH (22) from Internet | Critical | Direct shell access from internet |
| NSG allows RDP (3389) from Internet | Critical | Remote desktop open to internet |
| NSG allows all ports from * source | Critical | No port or source restriction |
| NIC with no NSG, subnet NSG allows broad access | High | No NIC-level filtering |
| Allow rule at lower priority than conflicting Deny | High | Priority ordering undermines deny intent |
| NSG allows database ports from non-app subnets | High | Database access not restricted to app tier |
| NSG with >50 custom rules | Medium | Excessive complexity |
| NSG not associated with any subnet or NIC | Medium | Unused — cleanup candidate |
| Metric | Severity | Action |
|---|---|---|
| Circuit status NotProvisioned | Critical | No connectivity — engage provider |
| BGP peering state Idle | High | Negotiation failure — check ASN and VLAN |
| Learned routes missing expected prefixes | High | On-prem routes not advertised |
| Circuit utilization >80% sustained | Medium | Plan upgrade or second circuit |
| Available IPs (% of address space) | Severity | Action |
|---|---|---|
| <10% remaining | High | Exhaustion risk — plan expansion |
| 10–25% remaining | Medium | Monitor growth proactively |
| >75% unused | Low | Over-provisioned |
NSG rule under review
├── Source is * or Internet service tag?
│ ├── Yes
│ │ ├── Port = 22 (SSH) or 3389 (RDP)?
│ │ │ ├── Yes → CRITICAL: Use Azure Bastion instead
│ │ │ └── No
│ │ │ ├── Port = 443 on Application Gateway subnet?
│ │ │ │ ├── Yes → Acceptable for public services
│ │ │ │ └── No → HIGH: Review necessity
│ │ │ └── Port = * (all)?
│ │ │ └── CRITICAL: All ports open
│ │ └── Higher-priority Deny covering same traffic?
│ │ ├── Yes → Verify Deny priority < Allow priority
│ │ └── No → Classify severity by port
│ └── No (specific CIDR or ASG)
│ ├── ASG? → Review ASG membership scope
│ └── Broad CIDR (/8, /16)? → Medium — verify intent
VNet under review
├── Hub-spoke topology?
│ ├── No → Acceptable for small deployments
│ └── Yes
│ ├── Hub has Azure Firewall? → Verify UDRs route spoke traffic through hub
│ ├── VNet Peering correct?
│ │ ├── AllowGatewayTransit on hub? → Required for shared gateway
│ │ ├── UseRemoteGateways on spokes? → Required for hub gateway
│ │ └── AllowForwardedTraffic on both? → Required for transit
│ └── Spoke-to-spoke via Azure Firewall? → Best practice
├── NSGs on all workload subnets?
│ ├── No → HIGH: No network filtering
│ └── Yes → Audit rules per Step 2
├── Network Watcher enabled?
│ ├── No → CRITICAL: No diagnostics
│ └── Yes → Verify NSG Flow Logs
└── Address space overlaps peered VNets? → Blocks VNet Peering
AZURE VNET NETWORKING AUDIT REPORT
======================================
Subscription: [id] ([name])
Resource Group(s): [list]
VNet: [name] ([resource-id])
Address Spaces: [list]
Audit Date: [timestamp] Performed By: [operator]
VNET ARCHITECTURE:
Subnets: [total] (workload:[n] gateway:[n] firewall:[n] bastion:[n])
DDoS Protection: [Basic/Standard]
Private Endpoints: [n] | Service Endpoints: [n]
NSGs:
Total: [n] | Internet inbound: [n] | Unused: [n]
Effective rule conflicts: [n]
AZURE FIREWALL:
Deployed: [yes/no] | SKU: [Standard/Premium]
Threat intelligence: [Alert/Deny] | IDPS: [on/off]
Rule collections: DNAT:[n] Network:[n] Application:[n]
CONNECTIVITY:
ExpressRoute: [circuit or N/A] | BGP: [Connected/Idle]
VPN Gateway: [name or N/A] | Connections: [n]
VNet Peering: [n] | Gateway transit: [yes/no]
ROUTING:
UDR Tables: [n] | Forced tunneling: [n subnets]
BGP propagation disabled: [n tables]
OPTIMIZATION:
Orphaned NICs: [n] | Unassociated public IPs: [n]
Application Gateway utilization: [assessment]
FINDINGS:
1. [Severity] [Category] — [Description]
Resource: [id] → Recommendation: [action]
NEXT AUDIT: [CRITICAL: 30d, HIGH: 90d, clean: 180d]
If Network Watcher NSG Flow Logs are not configured, traffic visibility is limited to NSG hit counts. NSG Flow Logs require Network Watcher enabled and a storage account. Version 2 includes throughput data. Document missing Flow Logs as High.
Use az network nic show-effective-nsg for combined subnet and NIC NSG
rules. Check for: higher-priority Allow in NIC NSG overriding subnet Deny,
default rules (65000+) permitting VNet-to-VNet traffic, or ASG membership
including unintended NICs.
Verify VLAN ID matches between Azure and provider. Check BGP ASN matches
on-premises router. Use az network express-route peering show to compare
settings. Both primary and secondary should show "Connected".
Both peering links must be created. "Initiated" means only one side is configured. Create the reciprocal link. Cross-subscription peering requires RBAC on both subscriptions.
When ExpressRoute delivers inbound traffic directly but UDR routes return traffic through Azure Firewall, asymmetric routing occurs — the firewall drops return packets with no session state. Ensure UDR routes both directions through the firewall, or configure Azure Firewall SNAT.