Connect to a VM - specified private IP address: Azure portal - Azure Bastion (2024)

  • Article

IP-based connection lets you connect to your on-premises, non-Azure, and Azure virtual machines via Azure Bastion over ExpressRoute or a VPN site-to-site connection using a specified private IP address. The steps in this article show you how to configure your Bastion deployment, and then connect to an on-premises resource using IP-based connection. For more information about Azure Bastion, see the Overview.

Connect to a VM - specified private IP address: Azure portal - Azure Bastion (1)

Note

This configuration requires the Standard SKU tier for Azure Bastion. To upgrade, see Upgrade a SKU.

Limitations

Prerequisites

Before you begin these steps, verify that you have the following environment set up:

  • A VNet with Bastion already deployed.

    • Make sure that you have deployed Bastion to the virtual network. Once the Bastion service is provisioned and deployed in your virtual network, you can use it to connect to any VM deployed in any of the virtual networks that is reachable from Bastion.
    • To deploy Bastion, see Quickstart: Deploy Bastion with default settings.
  • A virtual machine in any reachable virtual network. This is the virtual machine to which you'll connect.

Configure Bastion

  1. Sign in to the Azure portal.

  2. In the Azure portal, go to your Bastion deployment.

  3. IP based connection requires the Standard SKU tier. On the Configuration page, for Tier, verify the tier is set to the Standard SKU. If the tier is set to the Basic SKU, select Standard from the dropdown.

  4. To enable IP based connection, select IP based connection.

    Connect to a VM - specified private IP address: Azure portal - Azure Bastion (2)

  5. Select Apply to apply the changes. It takes a few minutes for the Bastion configuration to complete.

Connect to VM - Azure portal

  1. To connect to a VM using a specified private IP address, you make the connection from Bastion to the VM, not directly from the VM page. On your Bastion page, select Connect to open the Connect page.

  2. On the Bastion Connect page, for IP address, enter the private IP address of the target VM.

    Connect to a VM - specified private IP address: Azure portal - Azure Bastion (3)

  3. Adjust your connection settings to the desired Protocol and Port.

  4. Enter your credentials in Username and Password.

  5. Select Connect to connect to your virtual machine.

Connect to VM - native client

You can connect to VMs using a specified IP address with native client via SSH, RDP, or tunneling. To learn more about configuring native client support, see Configure Bastion native client support.

Note

This feature does not currently support Microsoft Entra authentication or custom port and protocol.

Use the following commands as examples:

RDP:

az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-ip-address "<VMIPAddress>

SSH:

az network bastion ssh --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-ip-address "<VMIPAddress>" --auth-type "ssh-key" --username "<Username>" --ssh-key "<Filepath>"

Tunnel:

az network bastion tunnel --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-ip-address "<VMIPAddress>" --resource-port "<TargetVMPort>" --port "<LocalMachinePort>"

Next steps

Read the Bastion FAQ for additional information.

Connect to a VM - specified private IP address: Azure portal - Azure Bastion (2024)

FAQs

How do I Connect to a VM using a private IP address Azure? ›

Connect to VM - Azure portal

To connect to a VM using a specified private IP address, you make the connection from Bastion to the VM, not directly from the VM page. On your Bastion page, select Connect to open the Connect page. On the Bastion Connect page, for IP address, enter the private IP address of the target VM.

How do I Connect to a VM using Azure Bastion? ›

In the Azure portal, go to the virtual machine that you want to connect to. On the Overview page, select Connect, then select Bastion from the dropdown to open the Bastion page. You can also select Bastion from the left pane. On the Bastion page, enter the required authentication credentials, then click Connect.

Do you still need a public IP on VM if you use bastion host? ›

There isn't a requirement for a separate public IP on the virtual machine when connecting via Azure Bastion. Traffic is first routed to the public IP of Bastion. Bastion then routes RDP or SSH connections to the private IP address associated with the virtual machine.

When you deploy Azure Bastion which of the following require a public IP? ›

Azure Bastion deployments require a Public IP address, except Developer SKU deployments. The Public IP must have the following configuration: The Public IP address SKU must be Standard. The Public IP address assignment/allocation method must be Static.

How to connect VM with IP address? ›

Assigning an IPv6 address in Windows

Connect to the virtual machine via VNC or SPICE. To do so, in VMmanager go to Virtual machines → click on the VM name → VNC (SPICE). Right click on the network connection → Properties. Check that IPv6 (TCP/IPv6) is enabled.

How do I Connect to Azure portal VM? ›

Connect from Azure portal
  1. Go to the Azure portal to connect to a VM. Search for and select Virtual machines.
  2. Select the virtual machine from the list.
  3. Select Connect from the left menu.
  4. Select the option that fits with your preferred way of connecting. The portal helps walk you through the prerequisites for connecting.
Nov 15, 2023

What is Bastion in Azure VM? ›

Azure Bastion provides an integrated platform alternative to manually deploying and managing jump servers to shield your virtual machines.

Does Azure Bastion need its own virtual network? ›

Azure Bastion is deployed within virtual networks or peered virtual networks, and is associated to an Azure region. You're responsible for deploying Azure Bastion to a Disaster Recovery (DR) site virtual network.

How do I start a Bastion session? ›

So I initiate a bastion session from the Azure portal: from my VM page I click on connect > bastion, I fill in my credentials (I use a password from an Azure Key Vault), and click on connect.

How do I Connect to a private server from bastion host? ›

Connecting to a private EC2 instance with a terminal via Bastion Host
  1. Select “Amazon Linux 2 AMI”,
  2. Instance type “t2. ...
  3. Select your custom VPC and public subnet,
  4. Add tag “Name = Bastion_Host”
  5. In the security group section, select My IP as the source for the SSH connection.
  6. Select your key pair and launch your instance.
Feb 18, 2022

What is a Bastion IP in Azure? ›

Azure Bastion is a fully managed service that provides more secure and seamless Remote Desktop Protocol (RDP) and Secure Shell Protocol (SSH) access to virtual machines (VMs) without any exposure through public IP addresses.

What is the difference between Azure Bastion and VPN? ›

The primary difference between bastion hosts and VPNs is that a bastion host, by necessity, creates a single point of entry or failure, whereas a VPN creates separate encrypted private tunnels for each connection.

Which two methods can be used to deploy the Azure Bastion service? ›

Each correct answer presents a complete solution. Here's the best way to solve it. You can deploy the Azure Bastion service using either the Azure portal or Azure PowerShell.

How many connections can you have in Azure Bastion? ›

For example, for "medium" workload each instance can support 20 concurrent RDP and 40 concurrent SSH sessions. For Azure Bastion Basic SKU, you are limited to 2 instances, whereas with Standard SKU you can have up to 50 instances.

How do I access my Azure VM using public IP? ›

  1. Sign in to the Azure portal.
  2. In the portal, search for and select the VM that you want to add the public IP address to.
  3. Under Settings in the left pane, select Networking, and then select the network interface you want to add the public IP address to.
Aug 24, 2023

What is the difference between public IP and private IP in Azure? ›

A virtual network in Azure can have private and public IP addresses. Private IP addresses are only accessible from within the virtual network and public IP addresses can be accessed from the internet as well. You can access private IP addresses from a VPN Gateway or an ExpressRoute connection.

Does an Azure VM need a public IP address? ›

Azure Virtual Machines is the main compute service in Azure. Customers can create Linux or Windows virtual machines. A public IP address can be assigned to a virtual machine for inbound connections to the virtual machine. A virtual machine doesn't require a public IP address for its configuration.

How can you remotely manage Azure virtual machines that do not have public IP addresses? ›

VPN Connections

Like Azure Bastion, using a VPN connection to remotely connect to a virtual machine, a VPN connection does not require your virtual machine to have a public IP address assigned to it, which simplifies NSG management and reduce the cost associated with the virtual machine.

Top Articles
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 6172

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.