Creating a Network Security Group (NSG)

This tutorial guides you through the process of creating a new Network Security Group (NSG) in Azure using the Azure portal. NSGs are a fundamental component for network security in Azure, allowing you to filter network traffic to and from Azure resources in an Azure Virtual Network.

Prerequisites

Before you begin, ensure you have:

Steps to Create an NSG

Step 1: Access the Azure Portal

Log in to the Azure portal with your Azure account credentials.

Step 2: Navigate to Network Security Groups

In the Azure portal search bar at the top, type "Network Security Groups" and select it from the search results.

Step 3: Create a New NSG

On the Network Security Groups page, click the + Create button to start the creation process.

Step 4: Configure Basics

In the "Create network security group" blade:

  • Subscription: Select the Azure subscription you want to use.
  • Resource group: Choose an existing resource group or click "Create new" to create a new one.
  • Name: Enter a unique name for your NSG (e.g., my-nsg-example).
  • Region: Select the Azure region where you want to deploy the NSG. This should typically be the same region as the resources you intend to associate it with.

Step 5: Review and Create

Review the configuration details you've entered. Once satisfied, click the Review + create button.

Step 6: Deployment

The system will validate your configuration. If validation passes, click Create. Deployment usually takes a few moments.

Once the deployment is complete, your new Network Security Group will be ready to use. You can now associate it with subnets or network interfaces and configure inbound and outbound security rules.

Example NSG Configuration

After creation, you can view and manage your NSG. Here's a typical view of a newly created NSG:

Resource Type: Network Security Group
Name: my-nsg-example
Location: East US
Resource Group: my-resource-group
Default Rules: AllowVNetInBound, AllowAzureLoadBalancerInBound, DenyAllInBound, AllowVnetOutBound, DenyAllOutBound
Security Rules: 0 configured

Next Steps

Now that you have created an NSG, the next logical steps are: