Skip to main content

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

Hands-On Lab


Photo of Gary McLeary

Gary McLeary

Azure Training Architect I in Content





In this Hands-On-Lab we will be learning how to create a network security group and how to add inbound/outbound rules. This is an important task because the Network Security Group is a valuable component that will help you protect your Azure Cloud environment. By the end of this Hand-On-Lab, you will have created an NSG(Network Security Group) which will prevent the web server to be accessed insecurely via browser. You will accomplish this by:<br><br> 1) Logging into the Azure Portal and creating an NSG<br> 2) Creating a Network Security Group within the Azure Portal<br> 3) Create inbound Rules within the Network Security Group which will deny access to port 80 and allow access to port 443 and 3389<br> 4) Assign this network Security Group to the NIC of the Virtual Machine. <br><br> 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 your Azure infrastructure. NOTE: On the step where you are asked to delete the Lab-NSG, you'll have to disassociate the subnet 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.