USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksAzure Cloud Book
HomeAzure BookAzure Foundations
PreviousMicrosoft Entra ID, Azure RBAC, Service Principals, and Managed IdentitiesNextAzure Storage: Blobs, Files, Queues, Tables, Redundancy, Security, and Lifecycle
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

10 sections

Progress0%
1 / 10

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Azure Networking: VNets, Subnets, NSGs, Routes, DNS, NAT, Peering, and Private Endpoints

An Azure virtual network is a private IP address space for Azure resources. Subnets divide it into policy and routing boundaries. Network security groups filter traffic, route tables influence paths, DNS resolves names, NAT Gateway provides stable outbound connectivity, peering joins VNets, and private endpoints give supported services private IP addresses.

Lab: 45 minutes · Cost: VNet/subnet/NSG are generally not separately charged; NAT Gateway, public IPs, peering traffic, Private Link, firewall, and gateways can be billable · Cleanup: delete the lab resource group.

How should you plan address space?

Start with non-overlapping RFC 1918 ranges and leave room for growth. Example:

NetworkCIDRPurpose
VNet10.20.0.0/16Northstar development
snet-app10.20.1.0/24Application workloads
snet-data10.20.2.0/24Private endpoints and data
AzureBastionSubnetsize per current guidanceAzure Bastion, if used

Azure reserves addresses in every subnet. Some services require dedicated or delegated subnets and minimum sizes. Check current product guidance before finalizing an enterprise IP plan.

How can you create the VNet?

Ways to build

Choose the Azure tool you want to use. The underlying resource stays the same.

Azure portal

  1. Search Virtual networks → Create.
  2. Select subscription and resource group.
  3. Enter vnet-northstar-dev-001 and a region.
  4. Add 10.20.0.0/16.
  5. Create snet-app and snet-data.
  6. Review security options instead of accepting public exposure by habit.
  7. Create, then open Subnets, Peerings, DNS servers, and DDoS protection to learn the blade.

Azure CLI

bash
AZURE_RG="rg-northstar-dev-001" AZURE_LOCATION="eastus" AZURE_VNET="vnet-northstar-dev-001" az network vnet create \ --resource-group "$AZURE_RG" \ --name "$AZURE_VNET" \ --location "$AZURE_LOCATION" \ --address-prefixes 10.20.0.0/16 \ --subnet-name snet-app \ --subnet-prefixes 10.20.1.0/24 az network vnet subnet create \ --resource-group "$AZURE_RG" \ --vnet-name "$AZURE_VNET" \ --name snet-data \ --address-prefixes 10.20.2.0/24

Azure PowerShell

powershell
$AppSubnet = New-AzVirtualNetworkSubnetConfig -Name "snet-app" -AddressPrefix "10.20.1.0/24" $DataSubnet = New-AzVirtualNetworkSubnetConfig -Name "snet-data" -AddressPrefix "10.20.2.0/24" New-AzVirtualNetwork ` -Name "vnet-northstar-dev-001" ` -ResourceGroupName "rg-northstar-dev-001" ` -Location "eastus" ` -AddressPrefix "10.20.0.0/16" ` -Subnet $AppSubnet, $DataSubnet

How do NSGs work?

NSGs contain prioritized allow/deny rules for inbound and outbound traffic. Azure evaluates lower priority numbers first. Default rules exist. Associate NSGs with subnets for consistent policy and, when required, network interfaces for additional precision.

bash
az network nsg create \ --resource-group "$AZURE_RG" \ --name nsg-app \ --location "$AZURE_LOCATION" az network nsg rule create \ --resource-group "$AZURE_RG" \ --nsg-name nsg-app \ --name allow-https-from-gateway \ --priority 200 \ --direction Inbound \ --access Allow \ --protocol Tcp \ --source-address-prefixes 10.20.10.0/24 \ --destination-port-ranges 443

Do not add 0.0.0.0/0 SSH or RDP rules for convenience. Use Bastion, a private connection, or time-bound controlled access.

What do routes, NAT, and service endpoints do?

Azure supplies system routes. A user-defined route can send traffic through a firewall or appliance. NAT Gateway gives supported subnets scalable outbound internet access with stable public IPs; it does not accept unsolicited inbound connections. Service endpoints keep service traffic on the Azure backbone but the service still has a public endpoint. Private endpoints place a network interface with a private IP in your VNet.

Why is DNS critical for private endpoints?

Applications still use the service's normal hostname. Private DNS must resolve that hostname to the private endpoint IP inside the network. A private endpoint without correct DNS often produces confusing timeouts or sends clients to the public endpoint.

Rendering diagram...

Link the service-specific private DNS zone to each VNet that must resolve it. Hybrid networks need DNS forwarding or Azure DNS Private Resolver design.

How do Bicep and Terraform fit?

Bicep:

bicep
resource vnet 'Microsoft.Network/virtualNetworks@2024-05-01' = { name: 'vnet-northstar-dev-001' location: resourceGroup().location properties: { addressSpace: { addressPrefixes: ['10.20.0.0/16'] } subnets: [ { name: 'snet-app'; properties: { addressPrefix: '10.20.1.0/24' } } { name: 'snet-data'; properties: { addressPrefix: '10.20.2.0/24' } } ] } }

Terraform uses azurerm_virtual_network, azurerm_subnet, azurerm_network_security_group, and explicit association resources. Production modules should validate CIDRs, expose only intentional inputs, and avoid implicit dependencies.

How do you troubleshoot networking?

  1. Resolve the hostname from the actual client.
  2. Inspect the effective route table.
  3. Inspect effective NSG rules.
  4. Confirm source and destination IPs and ports.
  5. Use Network Watcher connection troubleshoot and flow logs where supported.
  6. Check resource firewalls and application listeners.
  7. Confirm asymmetric routing is not introduced by an appliance.

Verify and clean up

bash
az network vnet show --resource-group "$AZURE_RG" --name "$AZURE_VNET" --output jsonc az network vnet subnet list --resource-group "$AZURE_RG" --vnet-name "$AZURE_VNET" --output table

The VNet lab is inside the resource group. Delete the group after all dependent labs, or remove only its network resources when safe.

Official references

  • Azure Virtual Network documentation
  • Azure network security groups
  • Azure Private Link
  • Azure DNS Private Resolver