Security with Network Security Groups (NSGs) in Azure Virtual WAN

Note: This documentation provides guidance on leveraging Network Security Groups (NSGs) to enhance the security posture of your Azure Virtual WAN deployments.

On This Page

Introduction to NSGs and Virtual WAN

Azure Virtual WAN is a networking service that brings together networking, security, and routing capabilities into a single operational interface. Network Security Groups (NSGs) are a fundamental component of Azure's network security. They act as a distributed firewall, enabling you to filter network traffic to and from Azure resources in an Azure Virtual Network (VNet), an ExpressRoute circuit, or Azure Virtual WAN Hub.

For Virtual WAN, NSGs are crucial for defining granular access control policies for resources connected to the Virtual WAN hub, as well as for spokes VNets. This allows you to enforce security policies at various points within your wide area network.

Applying NSGs in Virtual WAN

In the context of Azure Virtual WAN, NSGs can be applied in two primary locations:

It's important to understand that NSGs are stateless, meaning they track the state of active network connections and only allow inbound traffic in the established state. This is different from stateful firewalls which track connections.

Understanding NSG Rules

NSGs contain a list of security rules that allow or deny inbound network traffic to a resource or deny outbound traffic from it. Each rule has the following properties:

Each NSG also has default rules that cannot be deleted but can be overridden by user-defined rules. These include rules to deny all inbound traffic and allow all outbound traffic.

Example NSG Rule (Allowing HTTP traffic)


{
    "name": "AllowHTTPInbound",
    "properties": {
        "priority": 100,
        "access": "Allow",
        "direction": "Inbound",
        "protocol": "Tcp",
        "sourceAddressPrefix": "*",
        "sourcePortRange": "*",
        "destinationAddressPrefix": "*",
        "destinationPortRange": "80"
    }
}
            

Best Practices

Tip: Utilize Azure Policy to enforce NSG configurations across your Virtual WAN environment, ensuring compliance with your organization's security standards.

Common Security Scenarios

Scenario 1: Isolating Web Servers

In a spoke VNet hosting web servers, you can apply an NSG to the web server subnet to:

Scenario 2: Securing Database Servers

For a subnet containing database servers:

Warning: Incorrectly configured NSG rules can lead to connectivity issues or unintended security vulnerabilities. Always test changes in a non-production environment first.

Conclusion

Network Security Groups are an essential tool for securing resources within Azure Virtual WAN. By understanding how to apply and configure NSG rules effectively, you can implement granular network segmentation and enforce security policies that protect your sensitive data and applications. For advanced threat protection and centralized security management, consider integrating Azure Firewall with your Virtual WAN hub.