DEV Community

Cover image for Use Azure Bastion Service for Secure and Efficient Azure Virtual Machine Access
Aadyaa Srivastava
Aadyaa Srivastava

Posted on

Use Azure Bastion Service for Secure and Efficient Azure Virtual Machine Access

Introduction to Azure

Azure is Microsoft's cloud platform offering a range of services for computing, storage, networking, and more. It empowers businesses to build, deploy, and manage applications seamlessly in the cloud.

Define Azure Virtual Machine

Azure Virtual Machine (VM) is a scalable, on-demand computing resource on Azure. It allows users to run virtualized Windows or Linux servers in the cloud, providing flexibility and control over applications.

Introduction to Azure Bastion

Azure Bastion is a service that allows you to securely connect to your VMs using Remote Desktop Protocol (RDP) or Secure Shell (SSH) directly from the Azure portal. Here's a step-by-step guide to creating an Azure VM using Azure Bastion:

Prerequisites:

  1. Azure Subscription: You need an active Azure subscription. If you don't have one, you can create a free Azure account.

Steps:

1. Sign in to the Azure Portal:
2. Create a Resource Group:
  • In the left sidebar, click on "Resource groups."
  • Click on the "+ Add" button to create a new resource group.
  • Fill in the required details (Name, Region), click "Review + create" and then "Create."
  • Resource group can also be created while selecting a resource group when creating the virtual machine. You are just required to select Create New Resource Group from the dropdown menu of selecting resource group.

Resource Group

3. Create a Virtual Machine:
  • In the Azure portal, go to "Create a resource."
  • Search for "Windows Server" or "Linux" depending on your preference.
  • Click on the desired OS and then click "Create."
  • Fill in the required details for the VM (Name, Region, Image, Size, Authentication, etc.).
  • Scroll down to the "Networking" tab, and ensure that the "Enable Azure Bastion" option is selected.
  • Complete the remaining steps and click "Review + create" and then "Create."

VM

4. Review and Create:
  • Review your VM configuration and Bastion settings.
  • Click Review + create and then Create to provision the VM and Bastion.

Review and Create

5. Connect to VM using Bastion:
  • Once the VM is deployed, go to the VM in the Azure portal.
  • Click on the Connect button.
  • Select Bastion as the type of connection.
  • Enter the credentials (username and password or SSH key) and click Connect.

Access Vm using Bastion

Access Vm using Bastion

Access Vm using Bastion

7. Access VM through Bastion:
  • The Azure portal will open a new tab for Bastion.
  • Enter the credentials again (if prompted) to connect to your VM securely through Bastion.

Bastion

Bastion

Congratulations! You have now created an Azure VM using Azure Bastion.

Keep in mind that the particular stages may differ significantly depending on your choices during the VM creation process as well as any upgrades to the Azure portal interface. For the most accurate and up-to-date information, always consult the official Azure documentation.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay