Lesson 4 of 6 Securing Azure Virtual Networks

Administering VMs Securely with Azure Bastion

This lesson explains how Azure Bastion provides RDP and SSH without public IPs, its SKUs and its permissions.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how Azure Bastion connects to VMs.
  • Distinguish between the Developer, Basic, Standard and Premium SKUs.
  • Identify the subnet and permission requirements.

How Bastion works

Azure Bastion is a fully managed PaaS service deployed into a virtual network. An administrator selects Connect > Bastion on a VM in the Azure portal and opens an RDP or SSH session in the browser over HTTPS (TCP 443); Bastion then connects to the VM over its private IP address. VMs need no public IP and no agent, and their NSGs only need to allow RDP or SSH from the Bastion subnet. One Bastion host serves VMs in its own VNet and in peered VNets.

The following diagram compares public IP addresses on each VM with one Azure Bastion host serving VMs in three peered virtual networks.

Removing public IPs from twenty VMs in three peered VNets while keeping native RDP and file copy. One Azure Bastion Standard host in an AzureBastionSubnet of /26 or larger reaches all peered VNets; native client support and file transfer need Standard. The VMs lose their public IPs and NSGs allow RDP only from the Bastion subnet.
The scenario is illustrative.
Select all that apply

What Bastion needs

Exam skills 4.2.3

Select every statement that is true for VMs reached through a dedicated Azure Bastion host.

Log in to try this activity Interactive activities are free with an account.

SKUs

Bastion is offered in four SKUs. The comparison below summarizes them.

Developer
InfrastructureShared, free
Subnet and public IPNot required
Peered VNetsNo (own VNet only)
Extra featuresOne connection at a time
Choose when Dev and test, one VM at a time
Basic
InfrastructureDedicated
Subnet and public IPAzureBastionSubnet /26+, public IP
Peered VNetsYes
Extra featuresPortal RDP and SSH
Choose when Small production use in the portal
Standard
InfrastructureDedicated, scalable
Subnet and public IPAzureBastionSubnet /26+, public IP
Peered VNetsYes
Extra featuresNative client, file transfer, shareable links, IP-based connections, host scaling
Choose when Native clients and scale
Premium
InfrastructureDedicated, scalable
Subnet and public IPAzureBastionSubnet /26+, public IP optional (private-only)
Peered VNetsYes
Extra featuresSession recording, private-only deployment
Choose when Compliance recording and no public IP

Dedicated SKUs need a subnet named exactly AzureBastionSubnet of at least /26, and a Standard public IP unless deployed private-only in Premium. The SKU can be upgraded but not downgraded. With Standard or Premium, az network bastion rdp and az network bastion ssh connect from the local RDP or SSH client (native client support).

Sort into groups

Which Bastion SKU?

Exam skills 4.2.3

Choose the lowest Bastion SKU that meets each requirement.

Log in to try this activity Interactive activities are free with an account.

Permissions

A user needs Reader on the VM, on its network interface (with its private IP) and on the Bastion resource, plus Reader on the peered VNet when the VM is in a peered network, and valid credentials for the operating system. Microsoft Entra ID authentication can be used for Windows and Linux VMs that support it.

Select all that apply

Permissions to connect

Exam skills 4.2.3

A user connects through Bastion to a VM in a peered VNet. Select every permission they need.

Log in to try this activity Interactive activities are free with an account.
Worked example

Closing RDP to the internet

Twenty Windows VMs in three peered VNets have public IPs with RDP open to the internet. Security requires removing all public IPs from the VMs. Administrators must keep using their local RDP client and copy files to the VMs. Costs must be minimized. What should you deploy?

Deploy one Azure Bastion Standard host in an AzureBastionSubnet of /26 or larger in the hub (or one of the peered VNets), which reaches all peered VNets, then remove the VMs' public IPs and restrict NSGs to allow RDP only from the Bastion subnet. Standard is needed for native client connections and file transfer; Basic supports only browser sessions, and the Developer SKU serves only its own VNet, one connection at a time.

Check yourself

What is the minimum size of AzureBastionSubnet for dedicated Bastion SKUs?

Show answer

/26.

Exam Tips

Remember for the exam

  • Bastion connects over TLS 443 to VMs' private IPs; VMs need no public IP.
  • Dedicated SKUs need AzureBastionSubnet of /26 or larger.
  • Native client and file transfer need Standard or Premium; session recording needs Premium.
  • One Bastion serves peered VNets (not the Developer SKU).