Introduction
Creating private networks in Azure requires the use of Azure virtual networks. They provide safe communication between various Azure resources, the internet, and on-premises networks.
Creating a virtual network and subnet
- Log in to your azure account.
- Click create a resource
- Search for virtual network in the Market place
- Fill in the project details which comprises subscription and resource group
- Then fill the instance details which comprises virtual network name and region.
- Change the tab from Basics to Ip addresses
- Edit the Ipv4 address space to 10.1.0.0
- Click Default to edit the subnet, give a name for the subnet and change the starting address to 10.1.0.0 and leave the other settings as default and click save
- Click review + create
- Click create once validation is passed
How to Create two virtual machines in the same virtual network
- Click create a resource
- Search for virtual machine in the market place and click create
- Fill the project details which comprises of subscription and resource group
- Fill in the instance details
- Fill the Administrator account
- Leave the inbound port rules as default
- Click Networking tab and set the virtual network to the virtual network created earlier, leave other settings as default.
- Click review + create
- Click create once validation is passed
- Use this method to create another virtual machine and still set it to the virtual network created earlier. The two virtual machines are VM1 and VM2.
How to test if the Virtual machines can communicate using Ping.
- open VM1 by clicking on it and click connect in the overview page
- Click select under Native RDP
- This will open a pane to download RDP file
- After downloading the RDP file click on the file to launch it and click connect
- Enter your username and password and click Ok
- Click yes
- This will take you to the desktop page of your virtual machine and repeat this process to launch the second virtual machine
- We need to disable the public and private firewall of both virtual machine by searching for firewall in the search tab and click on Windows Defender Firewall
- Click on Turn Windows Defender Firewall on and off
- Click on Turn Windows Defender Firewall on and off for both public and private settings, click okay. From the first virtual machine open powershell command prompt by searching powershell in the search tab and click powershell
- In the powershell command prompt, run the code: ping vm2 This shows that the first virtual machine is connected to or can communicate with the second virtual machine
Top comments (0)