← Back to All Articles
Microsoft Azure

Zero Admin Port Exposure with Azure Bastion, Private DNS, and Azure Key Vault RBAC

A late-2021 Azure infrastructure hardening guide eliminating public jumpbox VMs via PaaS Azure Bastion TLS 443 brokering while replacing coarse Key Vault Access Policies with granular, PIM-eligible Azure RBAC secret permissions.

·9 min read·
#Azure Bastion#Key Vault RBAC#Private DNS#Zero Trust#JIT#Azure Security
Zero Admin Port Exposure with Azure Bastion, Private DNS, and Azure Key Vault RBAC

Executive Summary and Network Access Context

Publishing internet-facing jumpbox VMs or assigning coarse Key Vault Access Policies creates high-impact blast radii across Azure subscriptions: jumpboxes demand constant OS patching against external scanning while vault-wide access policies grant compromised apps every database secret in the vault. Replacing jumpboxes with managed Azure Bastion over TLS 443 and switching Key Vault to per-secret Azure RBAC eliminates both administrative exposure vectors simultaneously.

From an architectural evolution standpoint, this foundational design connects directly to modern platform controls. Standardizing Azure Bastion plus Key Vault RBAC data-plane permissions in 2021 retired risky jumpboxes and broad vault secrets access—forming the entry foundation for Bastion Premium session recording, Managed HSM, and Digital Sovereignty Cryptographic Key Control.

Trust Boundaries, Traffic Flows, and Design Principles

  • Azure Bastion resides inside a Hub VNet AzureBastionSubnet (/26+), proxying RDP and SSH over outbound TLS 443 without assigning Public IPs to any workload VM.
  • Bastion Standard unlocks native CLI tunneling (az network bastion rdp/ssh) while reinforcing Hub-Spoke Azure Firewall Private Link boundaries.
  • Azure Key Vault RBAC scopes least privilege (Key Vault Secrets User, Key Vault Crypto Officer) down to single secret keys, cleanly integrating with Azure AD PIM.
  • Management and application ingress must avoid raw public ports (RDP 3389, SSH 22) by routing through Private Endpoints, Azure Bastion, or SSE tunnels backed by symmetric UDR egress inspection.

Prerequisites, Network Dependencies, and RBAC Requirements

  • Licensing & Tiers: Azure Bastion Basic or Standard (Standard required for native client tunneling and IP-based connections); Key Vault RBAC carries zero extra cost.
  • Subnet & NSG Rules: Dedicated AzureBastionSubnet (/26 minimum) permitting control-plane GatewayManager 443 and internal VNet 3389/22 egress.
  • RBAC Matrix: Separate Bastion Reader VM access from scoped Key Vault data-plane secret assignments.

Technical Verification, Access Controls, and Telemetry

PowerShell Network Posture and Configuration Check

PowerShell script detecting remaining VM-attached Public IPs and verifying Key Vault RBAC + Purge Protection flags:

  • Execution Environment and Prerequisites: Requires Az.*.
  • Least Privilege and Operation Separation: Run with scoped Azure Reader (audit) / Contributor (state changes) privileges. All statements above are **read-only (Get-*/Test-*/Search-*)** verification checks making no direct configuration edits; still validate module/network prerequisites in a test cohort first.
  • Security Control Mapped and Boundary Note: Verifies active policy state and guards against silent drift or mis-scoped rollouts without blind production changes.
powershell
# 1. Audit Azure Public IPs currently attached to compute NICs
Connect-AzAccount
Get-AzPublicIpAddress | Where-Object { $_.IpConfiguration -ne $null } |
  Select-Object Name, ResourceGroupName, IpAddress, @{Name="TargetRef";Expression={$_.IpConfiguration.Id}}

# 2. Verify Azure Key Vault RBAC mode, Private access lock, and Purge Protection
Get-AzKeyVault -ResourceGroupName "RG-SEC-CORE" -VaultName "kv-prod-sovereign01" |
  Select-Object VaultName, EnableRbacAuthorization, PublicNetworkAccess, EnablePurgeProtection

Network Traffic Telemetry and KQL Verification Query

KQL security audit tracking Azure Bastion session brokering alongside Key Vault secret access logs:

kql
// Execution Scope: Read-only hunting/audit query (Log Analytics Reader / Security Reader)
// Data Source: Azure Resource Diagnostic Settings -> Log Analytics / Microsoft Sentinel (AzureDiagnostics)
AzureDiagnostics
| where TimeGenerated > ago(14d)
| where Category in ("BastionAuditLogs", "AuditEvent")
| project TimeGenerated, ResourceProvider, Category, OperationName, CallerIPAddress, ResultType, identity_claim_upn_s
| summarize AccessCount = count(), Denied = countif(ResultType != "Success" and ResultType != "200") by Category, OperationName
| order by AccessCount desc

Critical Architectural Assessment, Outage Risks, and Rollback Strategy

  • Blocking GatewayManager Service Tag inside Custom Bastion NSGs: Tight custom NSGs missing Azure control-plane tags break Bastion session health checks.
  • Confusing Management-Plane Contributors with Secret Access in RBAC Mode: Subscription Contributors intentionally lack permission to read secret values under RBAC mode unless explicitly granted Key Vault Secrets Officer.
  • Risks Mitigated vs. Residual Limitations: Private Endpoints, Azure Bastion, Azure Firewall, and Entra Global Secure Access eliminate direct public RDP/SSH exposure, lateral L3 VPN traversal, and unrestricted internet egress; they do not mitigate application-layer exploits (SQLi, SSRF) traversing authorized tunnels, compromised local endpoint binaries, or overly permissive spoke-to-spoke NSG rules.
  • New Dependencies and Production Failure Modes: Connectivity relies on consistent Private DNS Zone linking, symmetric UDR paths, and healthy endpoint SSE clients/connectors. Misconfigured 0.0.0.0/0 routing loops or missing private DNS zones instantly sever VM and hybrid application traffic in production.
  • Rollback and Pilot Validation Procedure: Validate firewall rules, NSG priorities, and SSE forwarding profiles against a canary VNet or pilot cohort first; maintain scripted Az.Network UDR/NSG snapshots and SSE bypass toggles to restore routing swiftly.

Verified Primary Sources & Open-Source Repositories

This architectural guide was cross-corroborated against the official advisories, Microsoft Learn docs, and open-source PowerShell / KQL repositories below.

Multi-Channel Distribution Summary (X & LinkedIn Draft)

Toggle X (Twitter) & LinkedIn sharing drafts
X (Twitter) Draft

Retire risky jumpbox VMs and coarse vault access policies with Azure Bastion Standard and Key Vault RBAC data-plane isolation. #AzureBastion #KeyVault

LinkedIn Draft

Zero admin port architecture in Azure: configuring AzureBastionSubnet NSG rules, eliminating VM Public IPs, and transitioning Key Vaults to per-secret Azure RBAC.