Azure Bastion
SKUs · AzureBastionSubnet · NSG rules · native client · roles · CLI and PowerShell
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
SKUs
| SKU | Infrastructure | What it adds |
|---|---|---|
| Developer | Free, shared infrastructure, one VM at a time, select regions | No peering support. No AzureBastionSubnet or public IP needed |
| Basic | Dedicated, fixed at 2 instances | Peered vnets are supported (Basic and higher) |
| Standard | Dedicated, host scaling of 2 to 50 instances | Native client, shareable links, IP-based connect, custom ports, file transfer |
| Premium | Standard, plus session recording | Session recording and private-only deployment (no public IP) |
Azure Bastion gives RDP and SSH over TLS (port 443) from the Azure portal or a native client. Target VMs need no public IP, no agent and no client software. Bastion connects to the VM's private IP. Billing starts when Bastion is deployed, whatever the usage.
Deployment requirements
- Basic, Standard and Premium need a subnet named exactly AzureBastionSubnet, /26 or larger, in the same vnet and resource group as the bastion host, with no other resources in it. Older deployments (before Nov 2, 2021) with a /27 still work.
- Create AzureBastionSubnet without route tables or delegations. UDRs aren't supported on it.
- Public IP (all SKUs except Developer and private-only): Standard SKU, Static allocation.
- A 0.0.0.0/0 default route advertised into the vnet (ExpressRoute or VPN force tunneling, or Route Server) breaks Bastion.
- Bastion doesn't support Azure Private Link or Azure Virtual Desktop. A Bastion in a vWAN hub isn't supported: deploy it in a spoke and use IP-based connect.
- To deploy you need
Microsoft.Network/virtualNetworks/write,virtualNetworks/subnets/join/actionandMicrosoft.Network/publicIPAddressespermissions. - Moving a vnet to another resource group: delete Bastion first, then redeploy it after the move.
- Don't link the Bastion vnet to private DNS zones named exactly
management.azure.com,blob.core.windows.net,core.windows.net,vaultcore.windows.net,vault.azure.netorazure.com. Zones such asprivatelink.blob.core.windows.netare fine.
Deployment order: vnet, then AzureBastionSubnet, then a Standard static public IP, then the Bastion host with its SKU, then connect from the VM's Connect › Bastion.
Connecting and roles
- Roles to connect: Reader on the VM, Reader on the NIC with the VM's private IP, Reader on the Bastion resource, and Reader on the target VM's vnet when Bastion is in a peered vnet. You also need OS rights (non-admin RDP users must be in Remote Desktop Users).
- One Bastion per vnet serves all VMs in that vnet. With peering (Basic and higher) it also serves VMs in peered vnets, including across subscriptions in the same tenant, but not across tenants.
- Native client needs Standard or Premium and the Native Client Support option turned on. It isn't supported from Cloud Shell. Session recording isn't available for native client. SSH keys stored in Key Vault aren't supported for native client sign-in.
- Session recordings go to a blob container through a SAS URL.
- Shareable links are Standard or higher. Custom domains aren't supported with shareable links.
- Entra guest accounts can be given Bastion access but can't use Entra authentication to sign in to the VM.
Upgrades and limits
| Item | Value |
|---|---|
| Upgrades (Developer to a dedicated SKU, Basic to Standard to Premium) | Supported, about 10 minutes |
| Downgrades | Not supported: delete and recreate |
| Instances | Basic 2 (fixed); Standard and Premium 2 to 50 |
| Sessions per instance | 20 RDP and 40 SSH |
| Basic maximum | 40 RDP and 80 SSH |
| At 50 instances | 1,000 RDP and 2,000 SSH |
| Default ports | 3389 RDP, 22 SSH; custom ports need Standard or higher |
NSG rules on AzureBastionSubnet
If you add an NSG to AzureBastionSubnet, you must create all of these rules.
| Direction | Rule | Source | Destination | Ports |
|---|---|---|---|---|
| Inbound | AllowHttpsInbound | Internet | any | 443 TCP |
| Inbound | AllowGatewayManagerInbound | GatewayManager | any | 443 TCP |
| Inbound | AllowAzureLoadBalancerInbound | AzureLoadBalancer | any | 443 TCP |
| Inbound | AllowBastionHostCommunication | VirtualNetwork | VirtualNetwork | 8080, 5701 |
| Outbound | AllowSshRdpOutbound | any | VirtualNetwork | 22, 3389 (use the VirtualNetwork tag if custom ports) |
| Outbound | AllowAzureCloudOutbound | any | AzureCloud | 443 TCP |
| Outbound | AllowBastionCommunication | VirtualNetwork | VirtualNetwork | 8080, 5701 |
| Outbound | AllowHttpOutbound | any | Internet | 80 |
The NSG on the target VM's subnet must allow inbound 3389 or 22 (or your custom port) from the AzureBastionSubnet range. Ports 3389 and 22 aren't needed on AzureBastionSubnet itself.
CLI and PowerShell
| Task | Command |
|---|---|
| Create the subnet | az network vnet subnet create --name AzureBastionSubnet --resource-group TestRG1 --vnet-name VNet1 --address-prefix 10.1.1.0/26 |
| Create the public IP | az network public-ip create --resource-group TestRG1 --name VNet1-ip --sku Standard --location eastus |
| Create Bastion (CLI) | az network bastion create --name VNet1-bastion --public-ip-address VNet1-ip --resource-group TestRG1 --vnet-name VNet1 --location eastus --sku Basic. In the CLI, omitting --sku gives Standard. --scale-units defaults to 2. |
| Create Bastion (PowerShell) | New-AzBastion -ResourceGroupName "BastionPowershellTest" -Name "testBastion2" -PublicIpAddressRgName ... -PublicIpAddressName ... -VirtualNetworkRgName ... -VirtualNetworkName ... -Sku "Standard" -ScaleUnit 3. In PowerShell, -Sku defaults to Basic. |
| Developer SKU | az network bastion create --name MyBastion --resource-group MyResourceGroup --sku Developer --vnet-name MyVnet (no subnet or public IP needed) |
| Turn on native client | az network bastion update --name MyBastionHost --resource-group MyResourceGroup --enable-tunneling |
| Native SSH | az network bastion ssh --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --auth-type password --username xyz (--auth-type is required) |
| Native RDP | az network bastion rdp --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId |
| Tunnel | az network bastion tunnel --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId --resource-port 22 --port 50022 |
az network bastion is an Azure CLI extension that installs on first use. Feature flags such as --enable-tunneling, --enable-ip-connect, --shareable-link, --file-copy and --session-recording default to off.
Exam Tips
Tick each tip once you can answer it without looking.
“Name of the subnet for a dedicated Bastion deployment” → AzureBastionSubnet (exact name). Trap: BastionSubnet or any other name.
“Smallest AzureBastionSubnet for a new deployment” → /26. Trap: a /27 only still works for deployments made before Nov 2, 2021.
“Public IP for a dedicated Bastion host” → Standard SKU, Static allocation. Trap: a Basic SKU public IP.
“Connect with a native RDP or SSH client, or az network bastion rdp” → Standard or Premium SKU with Native Client Support turned on. Trap: Basic does not support it.
“Basic Bastion must become Standard” → Upgrade in place (about 10 minutes). Trap: redeploying is not needed.
“Downgrade Premium to Standard” → Not supported: delete and recreate. Trap: changing the SKU on the Configuration page.
“Record user sessions for audit” → Premium SKU with session recording. Trap: Standard with diagnostic logs.
“Dedicated Bastion host with no public IP” → Premium private-only deployment. Trap: Basic or Standard, which need a Standard static public IP (Developer needs none either, but it is shared and serves one VM at a time).
“One Bastion in the hub for VMs in peered spokes” → Supported on Basic or higher; users also need Reader on the peered vnet. Trap: a Bastion per vnet is not required.
“Bastion reaching VMs in a peered vnet in another Entra tenant” → Not supported (same tenant across subscriptions is fine). Trap: any peering works.
“UDR 0.0.0.0/0 on AzureBastionSubnet to send traffic to a firewall” → Not supported. Trap: treating it as a compliance requirement.
“ExpressRoute advertises 0.0.0.0/0 into the Bastion vnet and Bastion stops working” → A default route advertised into the vnet breaks Bastion. Trap: Bastion is unaffected by it.
“Minimum roles for a user to connect” → Reader on the VM, the NIC and the Bastion (plus Reader on the vnet if peered). Trap: Virtual Machine Contributor.
“NSG on AzureBastionSubnet: inbound port from the Internet” → TCP 443 (and 443 from GatewayManager). Trap: opening 3389 or 22.
“NSG on the target VM subnet” → Allow 3389 or 22 from the AzureBastionSubnet range. Trap: allowing them from the Internet.
“Move a vnet that holds a Bastion to another resource group” → Delete Bastion first, redeploy after the move. Trap: Bastion moving along with the vnet.
“Does the target VM need a public IP or an agent?” → Neither. Trap: a public IP for portal connections.
“az network bastion create with no --sku” → Standard (the CLI default). Trap: in PowerShell, New-AzBastion -Sku defaults to Basic, so the two tools differ.
“Scale Bastion out beyond 2 instances” → Standard or Premium host scaling (2 to 50). Trap: Basic is fixed at 2.
Sources
- What is Azure Bastion?
- About Bastion configuration settings
- Choose the right Bastion SKU
- Azure Bastion FAQ
- Configure NSG rules for Azure Bastion
- Configure Bastion for native client connections
- Deploy Bastion with CLI
- az network bastion
- New-AzBastion
Checked against Microsoft Learn on November 13, 2026.