|
| 1 | +--- |
| 2 | +title: 'Quickstart: Connect to a virtual machine using a private IP address: Azure Bastion' |
| 3 | +description: In this article, learn how to create an Azure Bastion host from a virtual machine and connect securely using a private IP address. |
| 4 | +services: bastion |
| 5 | +author: cherylmc |
| 6 | + |
| 7 | +ms.service: bastion |
| 8 | +ms.topic: conceptual |
| 9 | +ms.date: 03/11/2020 |
| 10 | +ms.author: cherylmc |
| 11 | +# Customer intent: As someone with a networking background, I want to connect to a virtual machine securely via RDP/SSH without using a public IP address. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +# Quickstart: Connect to a virtual machine using a private IP address and Azure Bastion |
| 16 | + |
| 17 | +This quickstart article shows you how to connect to a virtual machine using a private IP address. When you connect via Bastion, your virtual machines don't need a public IP address. The steps in this article help you deploy Bastion to your virtual network via your virtual machine in the portal. Once the service is provisioned, the RDP/SSH experience is available to all of the virtual machines in the same virtual network. |
| 18 | + |
| 19 | +## <a name="prereq"></a>Prerequisites |
| 20 | + |
| 21 | +* An Azure virtual network. |
| 22 | +* An Azure virtual machine located in the virtual network with port 3389 open. |
| 23 | + |
| 24 | +### Example values |
| 25 | + |
| 26 | +|**Name** | **Value** | |
| 27 | +| --- | --- | |
| 28 | +| Name | VNet1Bastion | |
| 29 | +| Region | eastus | |
| 30 | +| Virtual network | VNet1 | |
| 31 | +| + Subnet Name | AzureBastionSubnet | |
| 32 | +| AzureBastionSubnet addresses | 10.1.254.0/27 | |
| 33 | +| Public IP address | Create new | |
| 34 | +| Public IP address name | VNet1BastionPIP | |
| 35 | +| Public IP address SKU | Standard | |
| 36 | +| Assignment | Static | |
| 37 | + |
| 38 | +## <a name="createvmset"></a>Create a bastion host |
| 39 | + |
| 40 | +When you create a bastion host in the portal by using an existing virtual machine, various settings will automatically default to correspond to your virtual machine and/or virtual network. |
| 41 | + |
| 42 | +1. Open the [Azure portal](https://portal.azure.com). Go to your virtual machine, then click **Connect**. |
| 43 | + |
| 44 | +  |
| 45 | +1. From the dropdown, select **Bastion**. |
| 46 | +1. On the Connect page, select **Use Bastion**. |
| 47 | + |
| 48 | +  |
| 49 | + |
| 50 | +1. On the Bastion page, fill out the following settings fields: |
| 51 | + |
| 52 | + * **Name**: Name the bastion host |
| 53 | + * **Subnet**: The subnet inside your virtual network to which Bastion resource will be deployed. The subnet must be created with the name **AzureBastionSubnet**. The name lets Azure know which subnet to deploy the Bastion resource to. This is different than a Gateway subnet. Use a subnet of at least /27 or larger (/27, /26, /25, and so on). |
| 54 | + |
| 55 | + * Select **Manage subnet configuration**, then select **+ Subnet**. |
| 56 | + * On the Add subnet page, type **AzureBastionSubnet**. |
| 57 | + * Specify the address range in CIDR notation. For example, 10.1.254.0/27. |
| 58 | + * Select **OK** to create the subnet. At the top of the page, navigate back to Bastion to complete the rest of the settings. |
| 59 | + |
| 60 | +  |
| 61 | + * **Public IP address**: This is the public IP of the Bastion resource on which RDP/SSH will be accessed (over port 443). Create a new public IP, or use an existing one. The public IP address must be in the same region as the Bastion resource you are creating. |
| 62 | + * **Public IP address name**: The name of the public IP address resource. |
| 63 | +1. On the validation screen, click **Create**. Wait for about 5 minutes for the Bastion resource create and deploy. |
| 64 | + |
| 65 | +  |
| 66 | + |
| 67 | +## <a name="connect"></a>Connect |
| 68 | + |
| 69 | +After Bastion has been deployed to the virtual network, the screen changes to the connect page. |
| 70 | + |
| 71 | +1. Type the username and password for your virtual machine. Then, select **Connect**. |
| 72 | + |
| 73 | +  |
| 74 | +1. The RDP connection to this virtual machine via Bastion will open directly in the Azure portal (over HTML5) using port 443 and the Bastion service. |
| 75 | + |
| 76 | +  |
| 77 | + |
| 78 | +## Clean up resources |
| 79 | + |
| 80 | +When you're done using the virtual network and the virtual machines, delete the resource group and all of the resources it contains: |
| 81 | + |
| 82 | +1. Enter *TestRG1* in the **Search** box at the top of the portal and select **TestRG1** from the search results. |
| 83 | + |
| 84 | +2. Select **Delete resource group**. |
| 85 | + |
| 86 | +3. Enter *TestRG1* for **TYPE THE RESOURCE GROUP NAME** and select **Delete**. |
| 87 | + |
| 88 | +## Next steps |
| 89 | + |
| 90 | +In this quickstart, you created a Bastion host for your virtual network, and then connected to a virtual machine securely via the Bastion host. |
| 91 | + |
| 92 | +* To learn more about Azure Bastion, read the [Bastion Overview](bastion-overview.md) and the [Bastion FAQ](bastion-faq.md). |
| 93 | +* To use Network Security Groups with the Azure Bastion subnet, see [Work with NSGs](bastion-nsg.md). |
| 94 | +* For instructions that contain explanations of Azure Bastion host settings, see the [Tutorial](bastion-create-host-portal.md). |
| 95 | +* To connect to a virtual machine scale set, see [Connect to a virtual machine scale set using Azure Bastion](bastion-connect-vm-scale-set.md). |
0 commit comments