Azure Firewall Public IP Addresses
Written By Ronnie Quan

Overview

What’s Azure firewall?

Azure Firewall is a managed cloud-based network security service that protects your Azure Virtual Network resources. It is a fully stateful firewall as a service with built-in high availability and unrestricted cloud scalability. You can centrally create, enforce, and log application and network connectivity policies across subscriptions and virtual networks. Azure Firewall uses a static public IP address for your virtual network resources allowing outside firewalls to identify traffic originating from your virtual network. The service is fully integrated with Azure Monitor for logging and analytics.

Why need multiple IP addresses

When you add more public IP addresses to your firewall, more SNAT ports are available, reducing the SNAT ports utilization. Additionally, when the firewall scales out for different reasons (for example, CPU or throughput) additional SNAT ports also become available. So effectively, a given percentage of SNAT ports utilization may go down without you adding any public IP addresses, just because the service scaled out. You can directly control the number of public IP addresses available to increase the ports available on your firewall. But, you can’t directly control firewall scaling.

Based on Azure official document, the minimum Azure firewall subnet size is /26. In order to support more outbound traffic from Azure firewall, you could either allocate a bigger CIDR to allow the service to scale out, or associate more public IP to the service. For more information about Azure standard load balancer SNAT port allocation, refer to https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections#preallocatedports

For this article, we will discuss more on Azure firewall multiple public IP addresses.

System Diagram

Design Options

Individual IP

IP from IP prefix

When you create public IP, there are two options, create each individual public IP address, or first create IP prefix, then create pip based off the prefix.

You don’t have to use IP prefix, but if you have any downstream filtering on your network, for example, route traffic to SAAS which requires source IP restriction, you need to allow all public IP addresses associated with your firewall, it will simplify operation or maintenance to utilize IP prefix.

A public IP address prefix is a reserved range of IP addresses in Azure. When you assign addresses to your resources from a public IP address prefix, firewall rule updates aren’t required. The entire range is added to the rule.

Be aware of the product limits, Azure firewall can have up to 250 pip, https://docs.microsoft.com/en-us/azure/firewall/features#multiple-public-ip-addresses

IP prefix length is /28 network or 16 IP addresses.

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits?toc=/azure/virtual-network/toc.json#networking-limits

Deployment

Example #1, use ARM template to create a brand new Azure firewall with one public IP.

Example #2, Add two more public IP addresses from IP prefix to the existing Azure firewall.

Public IP Prefix shows two consecutive IP addresses are allocated.
['Cloud Journey']
['Azure', 'Cloud', 'Networking']