Securely Connect to On-Premises VMs Using Azure Bastion and Private IPs

 

What Is This About?

With Azure Bastion, you can securely connect to your on-premises (local) machines, Azure VMs, or even non-Azure systems using a private IP address. No public IP needed! This guide shows you how to set up Bastion and connect to your on-premises VM over a VPN or ExpressRoute connection.



Why Use Azure Bastion for On-Premises Access?

  • Enhanced Security: Keep your machines safe by avoiding public IP addresses.
  • Centralized Access: Manage connections to all your systems (on-premises or in Azure) from one place.
  • Simple Setup: Follow a few steps to connect securely using private IPs.







What You’ll Need to Get Started

Before you begin, make sure you have:

  • A Virtual Network (VNet) with Azure Bastion:
    Bastion must be set up in your VNet. If not, follow the Quickstart: Deploy Bastion with Default Settings and Standard SKU guide.
  • A Reachable Virtual Machine:
    Ensure your on-premises VM (e.g., in Hyper-V) or Azure VM is in a VNet that Bastion can access.
  • VPN or ExpressRoute for On-Premises:
    To connect to a local VM, set up a VPN or ExpressRoute connection between your on-premises network and Azure.




         ---------------------------------------------------------------------------------------------------------


Steps to Set Up Azure Bastion for On-Premises Access

1. Configure Azure Bastion

  • Sign in to the Azure portal and go to your Bastion deployment.
  • Check the Tier: IP-based connection requires the Standard SKU or higher. On the Configuration page, ensure the Tier is set to Standard SKU (upgrade if needed).
  • Enable IP-Based Connection: Select the "IP-based connection" option and click Apply. This may take a few minutes.




2. Connect to Your On-Premises VM

  • Go to the Bastion page in the Azure portal and click Connect.
  • On the Connect page:
    • Enter the private IP address of your on-premises VM.
    • Select the Protocol (e.g., RDP for Windows or SSH for Linux) and Port (e.g., 3389 for RDP, 22 for SSH).
    • Provide your credentials (e.g., Username and Password in the format domainname\username or username@domainname).
  • Click Connect to securely access your VM.


                    ----------------------------------------------------------------------------------------------------




Important Limitations to Understand

Azure Bastion’s IP-based connection has some restrictions:

  • Internet Access Required: Bastion won’t work if you use force tunneling over VPN or advertise a default route via ExpressRoute, as this can block traffic.
  • Authentication Support: Microsoft Entra authentication works for SSH but not for RDP connections.
  • No Custom Ports/Protocols: You can’t use custom ports or protocols with a native client.
  • Routing Limitation: User-Defined Routes (UDR) are not supported on the Bastion subnet.
Source
https://learn.microsoft.com/sv-se/azure/bastion/connect-ip-address

Kommentarer

Populära inlägg i den här bloggen

🚀 IntuneWin – Deploying Win32 Apps via Intune 🎯

Block Personal devices to acces to Desktop apps like teams, Onedrive etc and how to troubleshooting the issue.

🔧 Microsoft 365 Apps Admin Center: Tips & Tricks