Azure Bastion
Connect to your VMs from the browser, with no public IP addresses and no open ports.
Opening SSH (port 22) or RDP (port 3389) to the internet invites attacks. Azure Bastion is a managed service inside your virtual network that lets you open an SSH or RDP session to a VM straight from the portal, over HTTPS.
Your VMs keep only private addresses, and the only thing that needs to be reachable is Bastion itself, which Microsoft patches and protects.
Cost. The Basic tier is about 0.19 USD an hour (around 100 GBP a month) and is billed while it exists. A free Developer tier exists in some regions, with limits, for one VM at a time.
Use it when
- admins need to reach VMs that have no public IP addresses.
- your security rules say no SSH or RDP ports may be open to the internet.
- you want sign-in to VMs to go through the portal, with Entra ID and its audit logs.
How it works
- AzureBastionSubnet
- Bastion (except the Developer tier) needs its own subnet with exactly this name, at least /26 in size.
- Connect
- On the VM, select Connect, then Bastion, and sign in. The session opens in a browser tab.
- Native client
- With the Standard tier and above, you can also use your own SSH or RDP program through Bastion.
Options
- Developer
- Free, in some regions, for one connection at a time. Good for testing; not for production.
- Basic
- A dedicated Bastion for your network, browser sessions only.
- Standard
- Adds native clients, file copy, scaling and sharable links.
- Premium
- Adds session recording and private-only deployment.
Example. Ironbridge Payments removed every public IP from its VMs. Engineers now connect through Bastion in the portal, and each session is recorded in the activity log.
Don't confuse it with
- Public IP plus NSG rule
- Cheap, but exposes the VM's port to the internet. Fine for a short practice; not for real systems.
- VPN gateway
- Joins whole networks. Bastion only gives admins a way into VMs.
- Just-in-time VM access
- A Defender for Cloud feature that opens a port briefly, only for an approved address.
Words to know
- Jump box
- A server you connect to first, to reach others. Bastion is a managed one.
- RDP
- Remote Desktop Protocol, for Windows desktops.
- SSH
- Secure Shell, for Linux command lines.
Where to look
- Virtual machines
- your VM
- Connect
- Bastion
Practise it
- Connect with SSH from Cloud ShellHow-to, Free tier
- Create a network security group and open one portHow-to, Free
Read it in the guide, next to the tasks and labs.
Open in Azure Portal, Hands On