0% found this document useful (0 votes)
32 views

Vnet Lab

Uploaded by

Sanskar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
32 views

Vnet Lab

Uploaded by

Sanskar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 11
‘22124, 204 PM Quickstart: Use the Azure portal o create a viual network - Azure Vitual Network | Microsoft Leam Quickstart: Use the Azure portal to create a virtual network Article » 06/08/2023 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 communicate privately 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. 4 ~ 443, Internet us $< AzureBastionSubnet ame 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 bastion host The following procedure creates a virtual network with a resource subnet, an Azure Bastion subnet, and an Azure Bastion host. 1. In the portal, search for and select Virtual networks. 2. On the Virtual networks page, select + Create, nitps:/leam microsot.comlon-ustazurelvitualnetwork/quck-crete-portal ant ‘22124, 204 PM (Quickstart: Use the Azure poral o create a virtual network - Azure Vitual Network | Microsoft 3. On the Basics tab of Create virtual network, enter or select the following information: <2 Expand table Setting Value Project details Subscription Select your subscription. Resource group Select Create new. Enter test-rg in Name. Select OK, Instance details Name Enter vnetet Region Select East US 2 ntps:/leam microsot.comlon-usfazurevitualnetwork/quck-create-portal aint ‘yo2i24, 304 PM Quickstart Use the Azure portal to create a vital network - Azure Virtual Network | Microsoft Learn BEA Corina mene x oF Virtual networks > Create virtual network x Basics Security IPaaddvesses Tage Review + create Enhance te security of your vital network ith these addtional pad security services. Lean more oP ‘Azure Bastion ‘Azure Bastion ia ped servic that provides secure ROP/SSH connectivity te your vital machines ever TLS. When you connect ‘va Azure Bastion your vital machines donot need a public Padres. Letn mare, Enable Azure Bastion © a ‘Azure Bastion host rame bastion ‘Azure Baton public IP acess * (New) publicip 7 Create publi P address ‘Azure Firewall ‘Azure Frevalic a managed cloud-bated network secuity service that protects your Aru Vitul Network resources. Learn more. Enable Azure Firewall a ‘Azure DDoS Network Protection ‘Azure DDOS Network Protection i paid sevice tat offers enhanced DDoS mitigation capable vi adaptive tuning, attack notation, an telemetiy to protect agaist the impacts ofa DOOS attack foal protected resources within this wt network. earn more Enable Azure DDoS Network Protection © [_] Peon | | Not | Rc eda hntps:leam microsof. conver-us/azurelitualnetworklquck-creste-portal ant ‘22124, 204 PM Quickstart: Use the Azure portal o create a viual network - Azure Vitual Network | Microsoft Leam 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: (2. Expand table Setting Value Subnet details Subnet template Leave the default Default. Name Enter subnet-1 Starting address Leave the default of 10.0.0.0. Subnet size Leave the default of /24(256 addresses). ntps:/leam microsot.comlon-usfazurevitualnetwork/quck-erete-portal sit ‘yo2i24, 304 PM ‘Quickstart Use the Azure portal to create a vital network - Azure Virtual Network | Microsoft Home > Vital networks > Edit subnet x Create virtual netwe Salect an adress space and configure your subnet. You can customize a default subnet o select rom mibne tempat you plan oad select services inter, Lear more fosics Security adresse Yd 1 address space © ne congue yor sad vores 1n000- 10255255 (82 addene) Define the address space of your vie Submet details ‘ual newo aert soace Site reece an Pade sae template © oa 3 Aad Beads pace 1 Name mae ream TTT Sting ane 10000 * ronanne nae Subnet see [2405 adteed ¥ ates spe © 1000 -1000255 256 adress) + Al se Subnets wi Sinner cr fr tual rhs by ing a eter aes araton ty. seta Fier sthnt ate wing anew secty up. ets ae Nat gta Nene 7 Aetstonsbret Grate Nec rp © Nene z Grate O AddemspceYOO807600 peste = = 10 per thee vital ners, © Ant ate conned Freda ns cc 10, Select Save. 11, Select Res select Create. w + create at the bottom of the screen, and when validation passes, Create virtual machines The following procedure creates two virtual machines (VMs) named vm-1 and vm-2 in the virtual network. 1. In the portal, search for and select Virtual machines. hntps:leam microsof. conver-us/azurelitualnetworklquck-creste-portal eit ‘22124, 204 PM Quickstart: Use the Azure portal o create a viual network - Azure Vitual Network | Microsoft Leam 2. In Virtual machines, select + Create, then Azure virtual machine. 3. On the Basics tab of Create a information: Setting Project details Subscription Resource group Instance details Virtual machine name Region Availability options Security type Image VM architecture Size Administrator account Authentication type Username Password Confirm password Inbound port rules Public inbound ports tual machine, enter or select the following © Expand table Value Select your subscription Select testrg. Enter vm-1 Select East US 2. Select No infrastructure redundancy required. Leave the default of Standard. Select Ubuntu Server 22.04 LTS - x64 Gen2. Leave the default of x64. Select a size. Select Password. Enter azureuser. Enter a password. Reenter the password, Select None. 4, Select the Networking tab at the top of the page. 5. Enter or select the following information in the Networking tab: ntps:/leam microsot.comlon-usfazurevitualnetwork/quck-create-portal mt ‘22124, 204 PM Quickstart: Use the Azure portal o create a viual network - Azure Vitual Network | Microsoft Leam Setting Network interface Virtual network Subnet Public IP NIC network security group Configure network security group (2 Expand table Value Select vnet. Select subnet-1 (10.0.0.0/24). Select None. Select Advanced, Select Create new. Enter nsg-1 for the name. Leave the rest at the defaults and select OK. 6. Leave the rest of the settings at the defaults and select Review + create. 7. Review the settings and select Create. 8, Repeat the previous steps to create a second virtual machine with the following settings: Setting Virtual machine name Virtual network Subnet Public IP NIC network security group Configure network security group O Note © Expand table Value Enter vm-2 Select vnet-1. Select subnet-1 (10.0.0.0/24) Select None. Select Advanced. Select nsg-1 Virtual machines in a virtual network with a 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 ntps:/leam microsot.comlon-usfazurelvitualnetwork/quck-ereate-portal art ‘22124, 204 PM Quickstart: Use the Azure portal o create a viual network - Azure Vitual Network | Microsoft Leam 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 back-end 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 |P is disabled when one of the following events happens: * A public IP address is assigned to the VM * The VM is placed in the back-end pool of a standard load balancer, with or without outbound rules. * An Azure Virtual Network 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 of vm-1, select Connect. 4. In the Connect to tual machine page, select the Bastion tab. 5, Select Use Bastion. 6. Enter the username and password you created when you created the VM, and then select Connect. ntps:/leam microsot.comlon-usfazurevitualnetwork/quck-erete-portal ont ‘22124, 204 PM Quickstart: Use the Azure portal o create a viual network - Azure Vitual Network | Microsoft Leam Communicate between VMs 1. At the bash prompt for vm-1, enter ping -¢ 4 vm-2 You get a reply similar to the following message: Output azureuser@vm-1:~$ ping -c 4 vm-2 PING vm-2, 3bnkevn3313ujprS1ikqop4ndd.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; time=1.83 ms 64 bytes from vm-2.internal.cloudapp.net (10.0.0.5 [email protected] ms 64 bytes from vm-2,internal.cloudapp.net (10.0.0.5; time=0.864 ms 64 bytes from vm-2.internal.cloudapp.net (10.0.0.5): [email protected]@ ms icmp_seq=1 ttl=64 icmp_seq=2 ttl=64 icmp_seq=3 tt1-64 icmp_seq=4 ttl=64 2. Close the Bastion connection to VM1 3, Repeat the steps in Connect to a virtual machine to connect to VM2. 4. At the bash prompt for vm-2, enter ping -¢ 4 vm-1 You get a reply similar to the following message: Output azureuser@vm-2:~$ ping -c 4 vm-1 PING vm-1.3bnkevn3313ujprS1ikqopanad.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 [email protected] ms 64 bytes from vm-1.internal.cloudapp.net (10.0.0.4: time=0.896 ms 64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): time=3.43 ns 64 bytes from vm-1.internal.cloudapp.net (10.0.0.4): time=0.780 ms icmp_seq=1 tt1-64 icmp_seq=2 ttl=64 iemp_seq=3 tt1=64 icmp_seq=4 ttl=64 5. Close the Bastion connection to VM2. ntps:/leam microsof.comlon-usfazurevitualnetwork/quck-ereate-portal sont sa, 304 Pm ica Use he Are porta crt ulnar - ure Vital Neto | Mose L eam Clean up resources When you're done using the resources 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 select Delete. Next steps In this quickstart, you created a virtual network with two subnets, one containing two VMs and the other for Azure Bastion. You deployed Azure Bastion and used it to connect to the VMs, and securely communicated 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. Continue to the next article to learn more about configuring different types of VM network communications. [-iternewor rae] nitps:/leam microsot.comlon-ustazurelvitualnetwork/quck-crete-portal ww

You might also like