Azure Bastion can best be described as a managed jump host. A jump host, also called a jump box, is a virtual machine that's placed on a virtual network. This article describes how to get started with Azure Bastion.
Let's say you manage two virtual machines deployed to a virtual network in Microsoft Azure. You have one Linux VM that you need to manage with Secure Shell and a Windows Server VM that you need to administer with the Remote Desktop Protocol (RDP).
However, corporate security policy prevents you from associating public IP addresses to those Azure VMs, and the business has not yet considered either a site-to-site virtual private network (S2S VPN) or ExpressRoute circuit to connect your on-premises environment to Azure.
Let's also make the assumption that the security team isn't comfortable with the expense and security overhead involved in deploying a jump host VM into your virtual network.
Well, I guess you're stuck, aren't you? No, not at all--relax. In today's tutorial, I'll show you how to use Azure Bastion.
Azure Bastion can best be described as a managed jump host. A jump host, also called a jump box, is a virtual machine that's placed on a virtual network, assigned a public IP address, and protected with strong network traffic ingress and egress rules.
The idea here is you connect to the jump host and then administer the production VMs on the network through the jump host. In Windows environments, the jump host normally runs Remote Desktop Gateway (RD Gateway) to support multiple simultaneous management sessions.
Although Microsoft hasn't confirmed my suspicion, I believe that Azure Bastion is actually an RD Gateway virtual machine under the hood. That said, we never get to interact directly with Bastion because it acts as a completely managed network virtual appliance.
Take a look at Figure 1, which illustrates my lab environment:
Figure 1. Azure Bastion network topology.
Note the following value propositions Azure Bastion brings the Azure VM administrator:
Let's turn our attention to learning how to create and configure an Azure Bastion host.
I suggest you configure your target virtual network before you deploy the Bastion. The most important point to keep in mind is Bastion requires its own empty, non-delegated subnet. You must name the subnet (appropriately enough) AzureBastionSubnet, and the subnet ID must be at least /27.
I show you my VNet subnet configuration in Figure 2.
Figure 2. This VNet is prepared for Azure Bastion.
Next, go to the Bastions blade, click Add, and complete the Create a Bastion form. In so doing you'll supply the following values:
Click Create and wait for the deployment to complete. Now we'll deploy two virtual machines to the target virtual network, one running Windows Server, and the other running Linux.
Some VM deployment notes for you to consider:
Figure 3 depicts what my virtual network looks like at this point. Strangely, the Azure Diagram feature doesn't show the Bastion on the AzureBastionSubnet subnet:
Figure 3. These VMs have no exposure to the public Internet.
As of this writing in February 2020, we connect to our Azure VMs through the Bastion host only through the Azure portal. That said, the Azure Bastion engineering team at Microsoft eventually plan to support client-side RDP and SSH tools.
For now, browse to the Overview blade of your Windows Server VM, click Connect, and select the BASTION tab, as shown in Figure 4.
Figure 4. Connecting to a VM through Azure Bastion.
After you authenticate with a local administrative account, you'll be prompted to allow or block shared clipboard access, and then you're free to manage that server over a graphical RDP session, as shown in Figure 5.
Figure 5. Managing a Windows Server VM with RDP through Bastion.
For Linux VMs, it's the same basic connection procedure (see Figure 6). You can authenticate to the VM by using either an SSH private key or a password, and you'll ultimately reach an SSH prompt (Figure 7).
Figure 6. Connecting to a Linux VM through Azure
Figure 7. Managing a Linux VM with SSH through Bastion.
To close the session, simply close the browser tab.
As I mentioned, you can add NSGs to both your Bastion subnet as well as your VM subnets to further enhance security. Read the Azure documentation article "Working with NSG access and Azure Bastion" to get a leg up on which ports and protocols you need to allow to and from the Bastion subnet.
As nice as Azure Bastion is, it has some significant "growing pains" to work through, in my humble opinion. First, at $.0.19 USD per hour (approximately $138 USD per Bastion host, per month), and given you cannot stop and deallocate the Bastion, the service is rather expensive.
Second, at this time, Bastion cannot span either peered VNets or VNets connected with a VNet-to-VNet VPN. This means you must deploy a separate Bastion host on every subnet you want to manage this way. Again, this is prohibitively expensive for many businesses.
Third, because we cannot interact with the Bastion host directly, we are currently unable to configure RDP session policies as we do with Group Policy on-premises. In fact, take a look at Figure 8: you don't have too much you can do with the Bastion host outside of inspecting sessions.
I hope you're in a more informed position with regard to Azure Bastion than you were prior to reading this article. Allow me to leave you with some hand-selected resources to help you continue your learning journey.
Tim Warner is a Microsoft MVP, Microsoft Press/Wiley author, and Azure solution architect based in Nashville, TN. Contact Tim at Twitter (@TechTrainerTim) or his website, techtrainertim.com.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.Learn More
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.