A Virtual Network (VNet) in Azure is a private, isolated network that enables Azure resources, like Virtual Machines (VMs), databases, and services, to securely communicate with each other, the internet, and your on-premises networks. Think of a VNet as your own data center's network in the cloud.
Why Use a Virtual Network
- To host secure applications that aren’t exposed to the public internet.
- To connect Azure VMs and other services to each other
- To connect Azure to your on-premises environment
- To implement hybrid cloud solutions
Scenario
You’re helping an Azure Admin maintain resources. While you won’t be responsible for maintaining the entire infrastructure, the Admin will ask you to help out by completing certain tasks. Currently, there’s a Linux virtual machine (VM) that’s underutilized, and a need for a new Linux machine to serve as an FTP server. However, the Azure admin wants to be able to track network flow and resource utilization for the needed FTP server, so has asked you to start out by provisioning a new subnet. The current subnet should be left alone, as there are future plans for using it for additional VMs.
How to update an Azure virtual network.
Create a new subnet on an existing virtual network (vNet) Steps:
1.Login to Microsoft Azure at https://portal.azure.com
2.From the Azure portal home page, in the search box, enter virtual networks. Select grayed virtual networks under services.
3.Select the guided-project-vnet virtual network.
4.From the guided-project-vnet blade, under settings, select Subnet
5.To add a subnet, select + Subnet
6.For Subnet purpose leave it as Default. For Name enter: ftpSubnet.
7.Leave the rest of the settings alone and select Add
Create a network security group
How to create Network security group (NSG). Steps:
1.From the Azure portal home page, in the search box, enter virtual networks
2.Select virtual networks under services
3.Select Network security groups
4.Select + Create
5.Select the guided-project-rg resource group. Enter ftpNSG for the network security group name.
6.Select Review + create
7.Select Create and wait for complete deployment.
Create an inbound security rule
Creating inbound security rule to control the inbound networks. Steps:
1.Under settings, select Inbound security rules
2.Select + Add
3.Change the Destination port ranges from 8080 to 22. Select **TCP **for the protocol
4.Set the name to ftpInbound. Select Add
5.Select Home to return to the Azure portal home page
Associate a network security group to a subnet
To associate a network security group to a subnet, we take the following steps:
1.From the Azure portal home page, in the search box, enter virtual networks. Select **virtual networks **under services
2.Select the guided-project-vnet virtual network
3.Under settings, select Subnets
4.Select the ftpSubnet you created
5.On the Edit subnet page, under the Security section heading, update the Network security group field to ftpNSG
6.Select Save
Top comments (1)
welldone