Skip to main content

Creating a Network Security Group with Inbound and Outbound Rules in Azure

Hands-On Lab


Photo of

Training Architect





In this hands-on lab, we learn how to create a network security group and how to add inbound and outbound rules. This is an important task because the network security group is a valuable component that will help protect the Azure Cloud environment. By the end of this hands-on lab, we will have created an NSG (network security group) which will prevent unsecured access to the web server via browser. We accomplish this by:

1) Logging into the Azure Portal and creating an NSG.<br> 2) Creating a network security group within the Azure Portal.<br> 3) Creating inbound rules within the network security group which will deny access to port 80 and allow access to ports 443 and 3389.<br> 4) Assigning this network security group to the NIC of the virtual machine.

The learning outcome will be to develop a basic understanding of the different components of the network security group and how to utilize the network security group with the intention of protecting an Azure infrastructure.

Note: On the step to delete the Lab-NSG, the subnet must be disassociated from Lab-NSG before deleting the Lab-NSG.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.