Quickstart: Use the Azure portal to create a virtual network - Azure Virtual Network (2024)

  • Article

This quickstart shows you how to create a virtual network by using the Azure portal. You then create two virtual machines (VMs) in the network, deploy Azure Bastion to securely connect to the VMs from the internet, and start private communication between the VMs.

A virtual network is the fundamental building block for private networks in Azure. Azure Virtual Network enables Azure resources like VMs to securely communicate with each other and the internet.

Prerequisites

  • An Azure account with an active subscription. You can create an account for free.

Sign in to Azure

Sign in to the Azure portal with your Azure account.

Create a virtual network and an Azure Bastion host

The following procedure creates a virtual network with a resource subnet, an Azure Bastion subnet, and a Bastion host:

  1. In the portal, search for and select Virtual networks.

  2. On the Virtual networks page, select + Create.

  3. On the Basics tab of Create virtual network, enter, or select the following information:

    SettingValue
    Project details
    SubscriptionSelect your subscription.
    Resource groupSelect Create new.
    Enter test-rg for the name.
    Select OK.
    Instance details
    NameEnter vnet-1.
    RegionSelect East US 2.

    Quickstart: Use the Azure portal to create a virtual network - Azure Virtual Network (2)

  4. Select Next to proceed to the Security tab.

  5. In the Azure Bastion section, select Enable Azure Bastion.

    Bastion uses your browser to connect to VMs in your virtual network over Secure Shell (SSH) or Remote Desktop Protocol (RDP) by using their private IP addresses. The VMs don't need public IP addresses, client software, or special configuration. For more information, see What is Azure Bastion?.

    Note

    Hourly pricing starts from the moment that Bastion is deployed, regardless of outbound data usage. For more information, see Pricing and SKUs. If you're deploying Bastion as part of a tutorial or test, we recommend that you delete this resource after you finish using it.

  6. In Azure Bastion, enter or select the following information:

    SettingValue
    Azure Bastion host nameEnter bastion.
    Azure Bastion public IP addressSelect Create a public IP address.
    Enter public-ip-bastion in Name.
    Select OK.

    Quickstart: Use the Azure portal to create a virtual network - Azure Virtual Network (3)

  7. Select Next to proceed to the IP Addresses tab.

  8. In the address space box in Subnets, select the default subnet.

  9. In Edit subnet, enter or select the following information:

    SettingValue
    Subnet purposeLeave the default of Default.
    NameEnter subnet-1.
    IPv4
    IPv4 address rangeLeave the default of 10.0.0.0/16.
    Starting addressLeave the default of 10.0.0.0.
    SizeLeave the default of /24 (256 addresses).

  10. Select Save.

  11. Select Review + create at the bottom of the window. When validation passes, select Create.

Create virtual machines

The following procedure creates two VMs named vm-1 and vm-2 in the virtual network:

  1. In the portal, search for and select Virtual machines.

  2. In Virtual machines, select + Create, and then select Azure virtual machine.

  3. On the Basics tab of Create a virtual machine, enter or select the following information:

    SettingValue
    Project details
    SubscriptionSelect your subscription.
    Resource groupSelect test-rg.
    Instance details
    Virtual machine nameEnter vm-1.
    RegionSelect East US 2.
    Availability optionsSelect No infrastructure redundancy required.
    Security typeLeave the default of Standard.
    ImageSelect Ubuntu Server 22.04 LTS - x64 Gen2.
    VM architectureLeave the default of x64.
    SizeSelect a size.
    Administrator account
    Authentication typeSelect Password.
    UsernameEnter azureuser.
    PasswordEnter a password.
    Confirm passwordReenter the password.
    Inbound port rules
    Public inbound portsSelect None.
  4. Select the Networking tab. Enter or select the following information:

    SettingValue
    Network interface
    Virtual networkSelect vnet-1.
    SubnetSelect subnet-1 (10.0.0.0/24).
    Public IPSelect None.
    NIC network security groupSelect Advanced.
    Configure network security groupSelect Create new.
    Enter nsg-1 for the name.
    Leave the rest at the defaults and select OK.
  5. Leave the rest of the settings at the defaults and select Review + create.

  6. Review the settings and select Create.

  7. Wait for the first virtual machine to deploy then repeat the previous steps to create a second virtual machine with the following settings:

    SettingValue
    Virtual machine nameEnter vm-2.
    Virtual networkSelect vnet-1.
    SubnetSelect subnet-1 (10.0.0.0/24).
    Public IPSelect None.
    NIC network security groupSelect Advanced.
    Configure network security groupSelect nsg-1.

Note

Virtual machines in a virtual network with an Azure Bastion host don't need public IP addresses. Bastion provides the public IP, and the VMs use private IPs to communicate within the network. You can remove the public IPs from any VMs in Bastion-hosted virtual networks. For more information, see Dissociate a public IP address from an Azure VM.

Note

Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the backend pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP address that isn't configurable.

The default outbound access IP is disabled when one of the following events happens:

  • A public IP address is assigned to the VM.
  • The VM is placed in the backend pool of a standard load balancer, with or without outbound rules.
  • An Azure NAT Gateway resource is assigned to the subnet of the VM.

VMs that you create by using virtual machine scale sets in flexible orchestration mode don't have default outbound access.

For more information about outbound connections in Azure, see Default outbound access in Azure and Use Source Network Address Translation (SNAT) for outbound connections.

Connect to a virtual machine

  1. In the portal, search for and select Virtual machines.

  2. On the Virtual machines page, select vm-1.

  3. In the Overview information for vm-1, select Connect.

  4. On the Connect to virtual machine page, select the Bastion tab.

  5. Select Use Bastion.

  6. Enter the username and password that you created when you created the VM, and then select Connect.

Start communication between VMs

  1. At the bash prompt for vm-1, enter ping -c 4 vm-2.

    You get a reply similar to the following message:

    azureuser@vm-1:~$ ping -c 4 vm-2PING vm-2.3bnkevn3313ujpr5l1kqop4n4d.cx.internal.cloudapp.net (10.0.0.5) 56(84) bytes of data.64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=1 ttl=64 time=1.83 ms64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=2 ttl=64 time=0.987 ms64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=3 ttl=64 time=0.864 ms64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): icmp_seq=4 ttl=64 time=0.890 ms
  2. Close the Bastion connection to vm-1.

  3. Repeat the steps in Connect to a virtual machine to connect to vm-2.

  4. At the bash prompt for vm-2, enter ping -c 4 vm-1.

    You get a reply similar to the following message:

    azureuser@vm-2:~$ ping -c 4 vm-1PING vm-1.3bnkevn3313ujpr5l1kqop4n4d.cx.internal.cloudapp.net (10.0.0.4) 56(84) bytes of data.64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=1 ttl=64 time=0.695 ms64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=2 ttl=64 time=0.896 ms64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=3 ttl=64 time=3.43 ms64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): icmp_seq=4 ttl=64 time=0.780 ms
  5. Close the Bastion connection to vm-2.

Clean up resources

When you finish using the resources that you created, you can delete the resource group and all its resources:

  1. In the Azure portal, search for and select Resource groups.

  2. On the Resource groups page, select the test-rg resource group.

  3. On the test-rg page, select Delete resource group.

  4. Enter test-rg in Enter resource group name to confirm deletion, and then select Delete.

Next steps

In this quickstart, you created a virtual network with two subnets: one that contains two VMs and the other for Bastion. You deployed Bastion, and you used it to connect to the VMs and establish communication between the VMs. To learn more about virtual network settings, see Create, change, or delete a virtual network.

Private communication between VMs is unrestricted in a virtual network. To learn more about configuring various types of VM network communications, continue to the next article:

Filter network traffic

Quickstart: Use the Azure portal to create a virtual network - Azure Virtual Network (2024)

FAQs

What are the steps in order to create a virtual network in the Azure portal? ›

Step 1 − First, log into your Azure Management Portal, select 'New' at the bottom left corner. Step 2 − Next, on the Network Services go to Virtual Network -> Quick create. Step 3 - Now, enter the name and leave all other fields empty and click 'next'.

Which Azure CLI command is used to create a virtual network? ›

Use the az network vnet create command to create a virtual network named TutorialVNet1 with address prefix of 10.0. 0.0/16 and a subnet named TutorialSubnet1 with address prefix of 10.0.

How to setup a virtual network? ›

To create an Azure Virtual Network using the Azure Portal:
  1. Navigate and sign in to the Azure portal.
  2. Select Create a resource on the Azure Portal homepage.
  3. On the Create a resource page, search the marketplace for virtual network and select it from the results.
  4. On the Virtual Network page, select Create.

How do I start Azure VM from Azure portal? ›

If you don't have an Azure subscription, create a free account before you begin.
  1. Sign in to Azure. Sign in to the Azure portal.
  2. Create virtual machine. Enter virtual machines in the search. ...
  3. Connect to virtual machine. ...
  4. Install web server. ...
  5. View the IIS welcome page. ...
  6. Clean up resources. ...
  7. Next steps.
Aug 22, 2024

What is a virtual network How is it created in Azure? ›

Azure Virtual Network is a service that provides the fundamental building block for your private network in Azure. An instance of the service (a virtual network) enables many types of Azure resources to securely communicate with each other, the internet, and on-premises networks.

How do I create an Azure portal? ›

Steps : How to Get Azure Free Subscription
  1. Go to the Azure Home Page.
  2. Click on Free Azure Account on the top right corner. ...
  3. Click on Start Free.
  4. Sign-in/Sign-up for a Microsoft account using an email address and password.
  5. Enter your Country/Region and Date of Birth and click next.
Jun 19, 2024

Which of the following methods can be used to create a virtual network in Azure? ›

You can use the following tools to create or configure a virtual network: Azure portal. PowerShell. Azure CLI.

What is the Azure CLI command to create? ›

PowerShell syntax comparison
CommandAzure CLI
Create Resource Groupaz group create --name <ResourceGroupName> --location eastus
Create Azure Storage Accountaz storage account create --name <StorageAccountName> --resource-group <ResourceGroupName> --location eastus --sku Standard_LRS --kind StorageV2
Mar 7, 2024

How do I create a new VM network? ›

Create a VM network (VLAN/PVLAN)
  1. Select VMs and Services > VM Networks > Home > Create > Create VM Network.
  2. In Create VM Network Wizard > Name, enter a name and description and select a logical network on which to base the VM network.
  3. In Isolation Options: ...
  4. In Summary, verify settings and select Finish.
Aug 21, 2024

How to connect to Azure virtual network? ›

Connect to a virtual machine
  1. In the portal, search for and select Virtual machines.
  2. On the Virtual machines page, select vm-1.
  3. In the Overview of vm-1, select Connect.
  4. In the Connect to virtual machine page, select the Bastion tab.
  5. Select Use Bastion.
Jun 17, 2024

How do I run Azure portal commands? ›

Go to a VM in the Azure portal and select Run command from the left menu, under Operations. You see a list of the available commands to run on the VM. Choose a command to run. Some of the commands might have optional or required input parameters.

How do I connect to Azure VM through portal? ›

Connect to the virtual machine
  1. Go to the Azure portal to connect to a VM. ...
  2. Select the virtual machine from the list.
  3. At the beginning of the virtual machine page, select Connect.
  4. On the Connect to virtual machine page, select RDP, and then select the appropriate IP address and Port number.

How do I give access to Azure portal? ›

Assign a role to an external user
  1. Sign in to the Azure portal.
  2. In the Search box at the top, search for the scope you want to grant access to. ...
  3. Select the specific resource for that scope.
  4. Select Access control (IAM). ...
  5. Select the Role assignments tab to view the role assignments at this scope.
Feb 28, 2024

What is the 4th step in the basic steps for deploying a virtual machine in Azure? ›

Explanation: The fourth step in deploying a virtual machine in Azure is to configure optional features. After initially setting up the bare-bones parameters and selecting a virtual machine image, you define and configure any optional settings.

How do I set up VNet in Azure? ›

Create virtual network peer
  1. In the search box at the top of the portal, enter Virtual network. Select Virtual networks in the search results.
  2. Select vnet-1.
  3. In Settings select Peerings.
  4. Select + Add.
  5. Enter or select the following information in Add peering: Expand table. Setting. Value. ...
  6. Select Add.
Jun 17, 2024

Top Articles
Cloud Architect Certification — How hard is “GCP — Cloud Architect” compared to AWS-SAP & AWS-SAA?
Free up space on your device - Android
Kansas City Kansas Public Schools Educational Audiology Externship in Kansas City, KS for KCK public Schools
Terrorist Usually Avoid Tourist Locations
Tabc On The Fly Final Exam Answers
Retro Ride Teardrop
Flights to Miami (MIA)
CA Kapil 🇦🇪 Talreja Dubai on LinkedIn: #businessethics #audit #pwc #evergrande #talrejaandtalreja #businesssetup…
Carter Joseph Hopf
The Blind Showtimes Near Showcase Cinemas Springdale
Brenna Percy Reddit
Hmr Properties
Bfg Straap Dead Photo Graphic
2 Corinthians 6 Nlt
Vistatech Quadcopter Drone With Camera Reviews
3S Bivy Cover 2D Gen
U Arizona Phonebook
Craigslist Prescott Az Free Stuff
Cbssports Rankings
Heart Ring Worth Aj
Air Traffic Control Coolmathgames
Craigslist Apartments Baltimore
Bra Size Calculator & Conversion Chart: Measure Bust & Convert Sizes
Geico Car Insurance Review 2024
Wku Lpn To Rn
Maine Racer Swap And Sell
Weather October 15
Ncal Kaiser Online Pay
Big Boobs Indian Photos
Srjc.book Store
Duke Energy Anderson Operations Center
Gideon Nicole Riddley Read Online Free
Gabrielle Enright Weight Loss
404-459-1280
Tendermeetup Login
Vanessa West Tripod Jeffrey Dahmer
SOC 100 ONL Syllabus
Property Skipper Bermuda
Sunrise Garden Beach Resort - Select Hurghada günstig buchen | billareisen.at
Sabrina Scharf Net Worth
Emily Browning Fansite
Fairbanks Auto Repair - University Chevron
N33.Ultipro
Gt500 Forums
Kate Spade Outlet Altoona
Gander Mountain Mastercard Login
Bonecrusher Upgrade Rs3
The top 10 takeaways from the Harris-Trump presidential debate
Smoke From Street Outlaws Net Worth
Www Ventusky
Morbid Ash And Annie Drew
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 6224

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.