security,

How is Azure Firewall different from Network Security Groups?

Sven Malvik Sven Malvik Connect Feb 04, 2021 · 2 mins read
How is Azure Firewall different from Network Security Groups?

Azure provides two security features in Azure for managing inbound and outbound traffic to and from Azure resources like virtual machines that are running an SQL Server, web applications, or domain services: Azure Firewall and Network Security Groups (NSGs). This post will discuss how the two differ from each other and how they can be paired up to secure traffic to resources in Azure.

Network Security Groups (NSG)

Azure Network Security Groups (NSGs) is an OSI layer 3 & 4 network service for refining traffic to and from an Azure Virtual Network (VNet). They can be associated with subnets or network interfaces of Azure VMs. It’s recommended to associate NSGs to subnets or network interfaces, but not both. The same NSG can be applied to many subnets. A NSG consists of rules that allow or deny network traffic based on 5-tuple information:

  • Protocol (TCP, UDP, ICMP)
  • Source IP address
  • Source port
  • Destination IP address
  • Destination port

Azure Firewall

Azure Firewall is a highly available, managed firewall service that filters network and application level traffic. It detects the workload in a VNet and protects Azure resources from malicious traffic. It has the ability to process traffic across subscriptions and VNets that are deployed in a hub-spoke model. This managed firewall service can filter and analyze OSI layer 3, 4 and 7 traffic. Azure Firewall provides the same capabilities as an NSG and more. This firewall service also eliminates the need for Load Balancer. Configuring two availability zones will give us a SLA of 99.99%.

Feature Comparison

Service Tags

Azure Firewall and NSG support service tags which are labels that represent a range of IP addresses for particular services such as Azure Key Vault, Data Lake, Container Registry, etc. These are managed by Microsoft and cannot be customized.

FQDN Tags

Only Azure Firewall supports FQDN Tags. They represent a group of fully qualified domain names of Microsoft services such as Windows Update or Azure Backup. Like service tags, they are managed by Microsoft, one tag to rule them all :)

SNAT

Only Azure Firewall supports Source Network Address Translation (SNAT). It’s possible to configure Azure Firewall with a public IP address that can be used to masked the IP address of Azure resources that are sending out via the Firewall.

DNAT

Only Azure Firewall supports Source Destination Address Translation (DNAT) which is used to translate incoming traffic to the firewall’s public IP address to the private IP addresses of a VNet.

When to use what?

NSGs and Azure Firewall work great together and should be used complimentary. We use NSGs for protecting incoming and outgoing traffic of a subnet. Azure Firewall is the service for filtering traffic to a VNet from the outside-world. It should be deployed in it’s own VNet and be isolated from other Azure resources. Azure Firewall is a highly available solution that can automatically scale.

Join Newsletter
Get the latest updates right in your inbox. I never spam!
Sven Malvik
Written by Sven Malvik

Latest Stories

How To Manage Azure Virtual Machines

I will go through the first steps for managing Virtual Machines. We will create a Windows VM, start the Internet Information Service IIS,...

Dec 26, 2020

AZ-303 Self-Study Guide for Becoming an Azure Solution Architect

Microsoft updated it’s role based exam for AZ-300. It’s now called AZ-303 and launched last year. This certification is a great proof for...

Feb 01, 2021

How to Use Azure Bastion as a Jump Host

Knowing about Azure Bastion is part of the AZ-303 exam for becoming an Azure Solution Architect. Bastion is very useful in cases where yo...

Dec 20, 2020

AZ-900 Self-Study Guide for Azure Fundamentals

There are many good reasons to become Microsoft Azure Certified and take the Microsoft Azure AZ-900 exam. If you are reading this blog po...

Feb 03, 2021

Event-Driven Infrastructure with App Configuration

Azure App Configuration is great for externalizing application configurations. But what if an application is our infrastructure? How coul...

Sep 12, 2020

How to Peer Virtual Networks in Azure

When we have two services running in two different virtual networks, they cannot communicate. To fix this, both VNet’s have to be peered....

Dec 23, 2020

Introduction to Azure API Management

Azure API Management (APIM) is a way to create consistent and modern API gateways for existing backend services. It provides an interface...

Jan 25, 2021

How to Create Custom Routes in Azure

Custom Routes, or user defined routing, is part of the az-303 certification for becoming an Azure Solution Architect. In this video I tel...

Dec 24, 2020

How to configure Azure Storage Accounts to Allow Access from Specific Subnets

Sometimes we store items in a storage account and want to restrict the access to certain services or clients. I will demonstrate how to r...

Dec 25, 2020

AZ-304 Self-Study Guide for Becoming an Azure Solution Architect Expert

Microsoft updated it’s role based exam for AZ-301. It’s now called AZ-304 and launched last year. This certification is a great proof for...

Feb 01, 2021

Serving Website Images from Azure CDN with SSL

In this post I will show you step by step how to serve images on a website from Azure CDN with SSL enabled. My blog has a couple of Azure...

Apr 25, 2020

Latest Stories

How To Manage Azure Virtual Machines

How To Manage Azure Virtual Machines

I will go through the first steps for managing Virtual Machines. We will create a Windows VM, start the Internet Information Service IIS,...

Dec 26, 2020

AZ-303 Self-Study Guide for Becoming an Azure Solution Architect

AZ-303 Self-Study Guide for Becoming an Azure Solution Architect

Microsoft updated it’s role based exam for AZ-300. It’s now called AZ-303 and launched last year. This certification is a great proof for...

Feb 01, 2021

How to Use Azure Bastion as a Jump Host

How to Use Azure Bastion as a Jump Host

Knowing about Azure Bastion is part of the AZ-303 exam for becoming an Azure Solution Architect. Bastion is very useful in cases where yo...

Dec 20, 2020

AZ-900 Self-Study Guide for Azure Fundamentals

AZ-900 Self-Study Guide for Azure Fundamentals

There are many good reasons to become Microsoft Azure Certified and take the Microsoft Azure AZ-900 exam. If you are reading this blog po...

Feb 03, 2021

Event-Driven Infrastructure with App Configuration

Event-Driven Infrastructure with App Configuration

Azure App Configuration is great for externalizing application configurations. But what if an application is our infrastructure? How coul...

Sep 12, 2020

How to Peer Virtual Networks in Azure

How to Peer Virtual Networks in Azure

When we have two services running in two different virtual networks, they cannot communicate. To fix this, both VNet’s have to be peered....

Dec 23, 2020

Introduction to Azure API Management

Introduction to Azure API Management

Azure API Management (APIM) is a way to create consistent and modern API gateways for existing backend services. It provides an interface...

Jan 25, 2021

How to Create Custom Routes in Azure

How to Create Custom Routes in Azure

Custom Routes, or user defined routing, is part of the az-303 certification for becoming an Azure Solution Architect. In this video I tel...

Dec 24, 2020

How to configure Azure Storage Accounts to Allow Access from Specific Subnets

How to configure Azure Storage Accounts to Allow Access from Specific Subnets

Sometimes we store items in a storage account and want to restrict the access to certain services or clients. I will demonstrate how to r...

Dec 25, 2020

AZ-304 Self-Study Guide for Becoming an Azure Solution Architect Expert

AZ-304 Self-Study Guide for Becoming an Azure Solution Architect Expert

Microsoft updated it’s role based exam for AZ-301. It’s now called AZ-304 and launched last year. This certification is a great proof for...

Feb 01, 2021

Serving Website Images from Azure CDN with SSL

Serving Website Images from Azure CDN with SSL

In this post I will show you step by step how to serve images on a website from Azure CDN with SSL enabled. My blog has a couple of Azure...

Apr 25, 2020