Azure Firewall
Azure Firewall
Azure Firewall is a cloud-native and intelligent network firewall security service that provides the best of breed
threat protection for your cloud workloads running in Azure. It's a fully stateful, firewall as a service with built-in
high availability and unrestricted cloud scalability. It provides both east-west and north-south traffic inspection.
Azure Firewall is offered in two SKUs: Standard and Premium.
To learn about Firewall Standard features, see Azure Firewall Standard features.
Supported regions
For the supported regions for Azure Firewall, see Azure products available by region.
What's new
To learn what's new with Azure Firewall, see Azure updates.
Known issues
Azure Firewall Standard
Azure Firewall Standard has the following known issues:
NOTE
Any issue that applies to Standard also applies to Premium.
Network filtering rules for non- Network filtering rules for non- Azure Firewall uses the Standard Load
TCP/UDP protocols (for example ICMP) TCP/UDP protocols don't work with Balancer, which doesn't support SNAT
don't work for Internet bound traffic SNAT to your public IP address. Non- for IP protocols today. We're exploring
TCP/UDP protocols are supported options to support this scenario in a
between spoke subnets and VNets. future release.
Missing PowerShell and CLI support Azure PowerShell and CLI don't It's still possible to use ICMP as a
for ICMP support ICMP as a valid protocol in protocol via the portal and the REST
network rules. API. We're working to add ICMP in
PowerShell and CLI soon.
FQDN tags require a protocol: port to Application rules with FQDN tags You can use https as the port:
be set require port: protocol definition. protocol value. We're working to make
this field optional when FQDN tags are
used.
Moving a firewall to a different Moving a firewall to a different Supporting this functionality is on our
resource group or subscription isn't resource group or subscription isn't road map. To move a firewall to a
supported supported. different resource group or
subscription, you must delete the
current instance and recreate it in the
new resource group or subscription.
Threat intelligence alerts may get Network rules with destination 80/443 Create outbound filtering for 80/443
masked for outbound filtering masks threat using application rules. Or, change the
intelligence alerts when configured to threat intelligence mode to Aler t and
alert only mode. Deny .
Azure Firewall DNAT doesn't work for Azure Firewall DNAT support is limited This is a current limitation.
private IP destinations to Internet egress/ingress. DNAT
doesn't currently work for private IP
destinations. For example, spoke to
spoke.
Can't remove first public IP Each Azure Firewall public IP address is This is by design.
configuration assigned to an IP configuration. The
first IP configuration is assigned during
the firewall deployment, and typically
also contains a reference to the firewall
subnet (unless configured explicitly
differently via a template deployment).
You can't delete this IP configuration
because it would de-allocate the
firewall. You can still change or remove
the public IP address associated with
this IP configuration if the firewall has
at least one other public IP address
available to use.
ISSUE DESC RIP T IO N M IT IGAT IO N
Availability zones can only be Availability zones can only be This is by design.
configured during deployment. configured during deployment. You
can't configure Availability Zones after
a firewall has been deployed.
SNAT on inbound connections In addition to DNAT, connections via To preserve the original source for
the firewall public IP address (inbound) HTTP/S, consider using XFF headers.
are SNATed to one of the firewall For example, use a service such as
private IPs. This requirement today Azure Front Door or Azure Application
(also for Active/Active NVAs) to ensure Gateway in front of the firewall. You
symmetric routing. can also add WAF as part of Azure
Front Door and chain to the firewall.
SQL FQDN filtering support only in For Azure SQL Database, Azure For SQL in redirect mode (the default if
proxy mode (port 1433) Synapse Analytics, and Azure SQL connecting from within Azure), you can
Managed Instance: instead filter access using the SQL
service tag as part of Azure Firewall
SQL FQDN filtering is supported in network rules.
proxy-mode only (port 1433).
Outbound SMTP traffic on TCP port Outbound email messages that are Use authenticated SMTP relay services,
25 is blocked sent directly to external domains (like which typically connect through TCP
outlook.com and gmail.com ) on port 587, but also supports other
TCP port 25 can be blocked by Azure ports. For more information, see
platform. This is the default platform Troubleshoot outbound SMTP
behavior in Azure, Azure Firewall does connectivity problems in Azure.
not introduce any additional specific Currently, Azure Firewall may be able
restriction. to communicate to public IPs by using
outbound TCP 25, but it's not
guaranteed to work, and it's not
supported for all subscription types.
For private IPs like virtual networks,
VPNs, and Azure ExpressRoute, Azure
Firewall supports an outbound
connection of TCP port 25.
SNAT port exhaustion Azure Firewall currently supports 2496 This is a platform limitation. You can
ports per Public IP address per work around the limits by configuring
backend virtual machine scale set Azure Firewall deployments with a
instance. By default, there are two minimum of five public IP addresses
virtual machine scale set instances. So, for deployments susceptible to SNAT
there are 4992 ports per flow exhaustion. This increases the SNAT
(destination IP, destination port and ports available by five times. Allocate
protocol (TCP or UDP). The firewall from an IP address prefix to simplify
scales up to a maximum of 20 downstream permissions. For a more
instances. permanent solution, you can deploy a
NAT gateway to overcome the SNAT
port limits. This approach is supported
for VNET deployments.
DNAT isn't supported with Forced Firewalls deployed with Forced This is by design because of
Tunneling enabled Tunneling enabled can't support asymmetric routing. The return path
inbound access from the Internet for inbound connections goes via the
because of asymmetric routing. on-premises firewall, which hasn't seen
the connection established.
Outbound Passive FTP may not work Passive FTP establishes different An explicit SNAT configuration is
for Firewalls with multiple public IP connections for control and data planned. In the meantime, you can
addresses, depending on your FTP channels. When a Firewall with multiple configure your FTP server to accept
server configuration. public IP addresses sends data data and control channels from
outbound, it randomly selects one of different source IP addresses (see an
its public IP addresses for the source IP example for IIS). Alternatively, consider
address. FTP may fail when data and using a single IP address in this
control channels use different source situation.
IP addresses, depending on your FTP
server configuration.
Inbound Passive FTP may not work Passive FTP establishes different Preserving the original source IP
depending on your FTP server connections for control and data address is being investigated. In the
configuration channels. Inbound connections on meantime, you can configure your FTP
Azure Firewall are SNATed to one of server to accept data and control
the firewall private IP addresses to channels from different source IP
ensure symmetric routing. FTP may fail addresses.
when data and control channels use
different source IP addresses,
depending on your FTP server
configuration.
Active FTP will not work when the FTP Active FTP utilizes a PORT command This is a general limitation of Active
client must reach an FTP server across from the FTP client that directs the FTP FTP when used in conjunction with
the internet. server what IP and port to use for the client-side NAT.
data channel. This PORT command
utilizes the private IP of the client
which cannot be changed. Client-side
traffic traversing the Azure Firewall will
be NAT for Internet-based
communications, making the PORT
command seen as invalid by the FTP
server.
NetworkRuleHit metric is missing a The ApplicationRuleHit metric allows A fix is being investigated.
protocol dimension filtering based protocol, but this
capability is missing in the
corresponding NetworkRuleHit metric.
NAT rules with ports between 64000 Azure Firewall allows any port in the 1- This is a current limitation.
and 65535 are unsupported 65535 range in network and
application rules, however NAT rules
only support ports in the 1-63999
range.
Configuration updates may take five An Azure Firewall configuration update A fix is being investigated.
minutes on average can take three to five minutes on
average, and parallel updates aren't
supported.
ISSUE DESC RIP T IO N M IT IGAT IO N
Azure Firewall uses SNI TLS headers to If browser or server software doesn't If browser or server software doesn't
filter HTTPS and MSSQL traffic support the Server Name Indicator support SNI, then you may be able to
(SNI) extension, you can't connect control the connection using a
through Azure Firewall. network rule instead of an application
rule. See Server Name Indication for
software that supports SNI.
Can't add firewall policy tags using the Azure Firewall Policy has a patch A fix is being investigated. Or, you can
portal or Azure Resource Manager support limitation that prevents you use the Azure PowerShell cmdlet
(ARM) templates from adding a tag using the Azure Set-AzFirewallPolicy to update
portal or ARM templates. The tags.
following error is generated: Could not
save the tags for the resource.
IPv6 not currently supported If you add an IPv6 address to a rule, Use only IPv4 addresses. IPv6 support
the firewall fails. is under investigation.
Updating multiple IP Groups fails with When you update two or more IP This is a known issue/limitation.
conflict error. Groups attached to the same firewall,
one of the resources goes into a failed When you update an IP Group, it
state. triggers an update on all firewalls that
the IPGroup is attached to. If an
update to a second IP Group is started
while the firewall is still in the Updating
state, then the IPGroup update fails.
Removing RuleCollectionGroups using Removing a RuleCollectionGroup using This is not a supported operation.
ARM templates not supported. ARM templates is not supported and
results in failure.
DNAT rule for allow any (*) will SNAT If a DNAT rule allows any (*) as the This is a current limitation.
traffic. Source IP address, then an implicit
Network rule will match VNet-VNet
traffic and will always SNAT the traffic.
Adding a DNAT rule to a secured This results in an asynchronous route Not supported.
virtual hub with a security provider is for the returning DNAT traffic, which
not supported. goes to the security provider.
Error encountered when creating more The maximal number of This is a current limitation.
than 2000 rule collections. NAT/Application or Network rule
collections is 2000 (Resource Manager
limit).
Unable to see Network Rule Name in Azure Firewall network rule log data Network rule name logging is in
Azure Firewall Logs does not show the Rule name for preview. For for information, see Azure
network traffic. Firewall preview features.
ISSUE DESC RIP T IO N M IT IGAT IO N
XFF header in HTTP/S XFF headers are overwritten with the A fix is being investigated.
original source IP address as seen by
the firewall. This is applicable for the
following use cases:
- HTTP requests
- HTTPS requests with TLS termination
Can't upgrade to Premium with You can't currently upgrade to Azure Deploy a new Premium firewall in
Availability Zones in the Southeast Firewall Premium with Availability Southeast Asia without Availability
Asia region Zones in the Southeast Asia region. Zones, or deploy in a region that
supports Availability Zones.
Can’t deploy Firewall with Availability When you deploy a Firewall with First create a new zone redundant
Zones with a newly created Public IP Availability Zones, you can’t use a Public IP address, then assign this
address newly created Public IP address. previously created IP address during
the Firewall deployment.
ESNI support for FQDN resolution in Encrypted SNI isn't supported in Today only Firefox supports ESNI
HTTPS HTTPS handshake. through custom configuration.
Suggested workaround is to disable
this feature.
QUIC/HTTP3 QUIC is the new major version of HTTP. Configure passing UDP 80/443 as
It's a UDP-based protocol over 80 network rules.
(PLAN) and 443 (SSL). FQDN/URL/TLS
inspection won't be supported.
Untrusted customer signed certificates Customer signed certificates are not A fix is being investigated.
trusted by the firewall once received
from an intranet-based web server.
Wrong source IP address in Alerts with When plain text HTTP traffic is in use, A fix is being investigated.
IDPS for HTTP (without TLS and IDPS issues a new alert, and the
inspection). destination is a public IP address, the
displayed source IP address is wrong
(the internal IP address is displayed
instead of the original IP address).
TLS 1.3 support TLS 1.3 is partially supported. The TLS Updates are being investigated.
tunnel from client to the firewall is
based on TLS 1.2, and from the firewall
to the external Web server is based on
TLS 1.3.
KeyVault Private Endpoint KeyVault supports Private Endpoint A fix is being investigated.
access to limit its network exposure.
Trusted Azure Services can bypass this
limitation if an exception is configured
as described in the KeyVault
documentation. Azure Firewall is not
currently listed as a trusted service and
can't access the Key Vault.
Availability Zones for Firewall Premium You can't currently deploy Azure Deploy the firewall in Southeast Asia
in the Southeast Asia region Firewall Premium with Availability without Availability Zones, or deploy in
Zones in the Southeast Asia region. a region that supports Availability
Zones.
Next steps
Quickstart: Create an Azure Firewall and a firewall policy - ARM template
Quickstart: Deploy Azure Firewall with Availability Zones - ARM template
Tutorial: Deploy and configure Azure Firewall using the Azure portal
Learn module: Introduction to Azure Firewall
Quickstart: Create an Azure Firewall and IP Groups
- ARM template
8/4/2022 • 6 minutes to read • Edit Online
In this quickstart, you use an Azure Resource Manager template (ARM template) to deploy an Azure Firewall
with sample IP Groups used in a network rule and application rule. An IP Group is a top-level resource that
allows you to define and group IP addresses, ranges, and subnets into a single object. This is useful for
managing IP addresses in Azure Firewall rules. You can either manually enter IP addresses or import them from
a file.
An ARM template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for
your project. The template uses declarative syntax. In declarative syntax, you describe your intended deployment
without writing the sequence of programming commands to create the deployment.
If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to
Azure button. The template will open in the Azure portal.
Prerequisites
An Azure account with an active subscription. Create an account for free.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualNetworkName": {
"type": "string",
"defaultValue": "[concat('vnet', uniqueString(resourceGroup().id))]",
"metadata": {
"description": "virtual network name"
}
},
"ipgroups_name1": {
"defaultValue": "[concat('ipgroup1', uniqueString(resourceGroup().id))]",
"type": "String"
},
"ipgroups_name2": {
"defaultValue": "[concat('ipgroup2', uniqueString(resourceGroup().id))]",
"type": "String"
},
"adminUsername": {
"type": "string",
"metadata": {
"description": "Username for the Virtual Machine."
}
},
"___location": {
"___location": {
"type": "string",
"defaultValue": "[resourceGroup().___location]",
"metadata": {
"description": "Location for all resources."
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_D2s_v3",
"metadata": {
"description": "Zone numbers e.g. 1,2,3."
}
},
"numberOfFirewallPublicIPAddresses": {
"type": "int",
"defaultValue": 1,
"minValue": 1,
"maxValue": 100,
"metadata": {
"description": "Number of public IP addresses for the Azure Firewall"
}
},
"authenticationType": {
"type": "string",
"defaultValue": "sshPublicKey",
"allowedValues": [
"sshPublicKey",
"password"
],
"metadata": {
"description": "Type of authentication to use on the Virtual Machine. SSH key is recommended."
}
},
"adminPasswordOrKey": {
"type": "securestring",
"metadata": {
"description": "SSH Key or password for the Virtual Machine. SSH key is recommended."
}
}
},
"variables": {
"vnetAddressPrefix": "10.0.0.0/16",
"serversSubnetPrefix": "10.0.2.0/24",
"azureFirewallSubnetPrefix": "10.0.1.0/24",
"jumpboxSubnetPrefix": "10.0.0.0/24",
"nextHopIP": "10.0.1.4",
"azureFirewallSubnetName": "AzureFirewallSubnet",
"jumpBoxSubnetName": "JumpboxSubnet",
"serversSubnetName": "ServersSubnet",
"jumpBoxPublicIPAddressName": "JumpHostPublicIP",
"jumpBoxNsgName": "JumpHostNSG",
"jumpBoxNicName": "JumpHostNic",
"jumpBoxSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',
parameters('virtualNetworkName'), variables('jumpBoxSubnetName'))]",
"serverNicName": "ServerNic",
"serverSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',
parameters('virtualNetworkName'), variables('serversSubnetName'))]",
"storageAccountName": "[concat(uniquestring(resourceGroup().id), 'sajumpbox')]",
"azfwRouteTableName": "AzfwRouteTable",
"firewallName": "firewall1",
"publicIPNamePrefix": "publicIP",
"azureFirewallSubnetId": "
[resourceId('Microsoft.Network/virtualNetworks/subnets',parameters('virtualNetworkName'),
variables('azureFirewallSubnetName'))]",
"azureFirewallSubnetJSON": "[json(format('{{\"id\": \"{0}\"}}', variables('azureFirewallSubnetId')))]",
"copy": [
{
"name": "azureFirewallIpConfigurations",
"count": "[parameters('numberOfFirewallPublicIPAddresses')]",
"input": {
"name": "[concat('IpConf', copyIndex('azureFirewallIpConfigurations'))]",
"properties": {
"subnet": "[if(equals(copyIndex('azureFirewallIpConfigurations'), 0),
variables('azureFirewallSubnetJSON'), json('null'))]",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',
concat(variables('publicIPNamePrefix'), add(copyIndex('azureFirewallIpConfigurations'), 1)))]"
}
}
}
}
],
"linuxConfiguration": {
"disablePasswordAuthentication": true,
"ssh": {
"publicKeys": [
{
"path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
"keyData": "[parameters('adminPasswordOrKey')]"
}
]
}
},
"networkSecurityGroupName": "[concat(variables('serversSubnetName'), '-nsg')]"
},
"resources": [
{
"type": "Microsoft.Network/ipGroups",
"apiVersion": "2020-06-01",
"name": "[parameters('ipgroups_name1')]",
"___location": "[parameters('___location')]",
"properties": {
"ipAddresses": [
"13.73.64.64/26",
"13.73.208.128/25",
"52.126.194.0/23"
]
}
},
{
"type": "Microsoft.Network/ipGroups",
"apiVersion": "2020-06-01",
"name": "[parameters('ipgroups_name2')]",
"___location": "[parameters('___location')]",
"properties": {
"ipAddresses": [
"12.0.0.0/24",
"13.9.0.0/24"
]
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"name": "[variables('storageAccountName')]",
"___location": "[parameters('___location')]",
"sku": {
"name": "Standard_LRS"
},
"kind": "StorageV2",
"properties": {}
},
{
"type": "Microsoft.Network/routeTables",
"apiVersion": "2020-06-01",
"name": "[variables('azfwRouteTableName')]",
"___location": "[parameters('___location')]",
"properties": {
"disableBgpRoutePropagation": false,
"routes": [
{
"name": "AzfwDefaultRoute",
"properties": {
"addressPrefix": "0.0.0.0/0",
"nextHopType": "VirtualAppliance",
"nextHopIpAddress": "[variables('nextHopIP')]"
}
}
]
}
},
{
"comments": "Simple Network Security Group for subnet [variables('serversSubnetName')]",
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2020-06-01",
"name": "[variables('networkSecurityGroupName')]",
"___location": "[parameters('___location')]",
"properties": {}
},
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2020-06-01",
"name": "[parameters('virtualNetworkName')]",
"___location": "[parameters('___location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/routeTables', variables('azfwRouteTableName'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
],
"tags": {
"displayName": "[parameters('virtualNetworkName')]"
},
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('vnetAddressPrefix')]"
]
},
"subnets": [
{
"name": "[variables('jumpBoxSubnetName')]",
"properties": {
"addressPrefix": "[variables('jumpboxSubnetPrefix')]"
}
},
{
"name": "[variables('azureFirewallSubnetName')]",
"properties": {
"addressPrefix": "[variables('azureFirewallSubnetPrefix')]"
}
},
{
"name": "[variables('serversSubnetName')]",
"properties": {
"addressPrefix": "[variables('serversSubnetPrefix')]",
"routeTable": {
"id": "[resourceId('Microsoft.Network/routeTables', variables('azfwRouteTableName'))]"
},
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups',
variables('networkSecurityGroupName'))]"
}
}
}
]
}
},
},
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2020-06-01",
"name": "[concat(variables('publicIPNamePrefix'), add(copyIndex(), 1))]",
"___location": "[parameters('___location')]",
"sku": {
"name": "Standard"
},
"copy": {
"name": "publicIpCopy",
"count": "[parameters('numberOfFirewallPublicIPAddresses')]"
},
"properties": {
"publicIPAllocationMethod": "Static",
"publicIPAddressVersion": "IPv4"
}
},
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2020-06-01",
"name": "[variables('jumpBoxPublicIPAddressName')]",
"___location": "[parameters('___location')]",
"properties": {
"publicIPAllocationMethod": "Dynamic"
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2020-06-01",
"name": "[variables('jumpBoxNsgName')]",
"___location": "[parameters('___location')]",
"properties": {
"securityRules": [
{
"name": "myNetworkSecurityGroupRuleSSH",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "22",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 1000,
"direction": "Inbound"
}
}
]
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2020-06-01",
"name": "[variables('JumpBoxNicName')]",
"___location": "[parameters('___location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPAddresses', variables('jumpBoxPublicIPAddressName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('jumpBoxNsgName'))]"
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',
variables('jumpBoxPublicIPAddressName'))]"
},
},
"subnet": {
"id": "[variables('jumpBoxSubnetId')]"
}
}
}
],
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('jumpBoxNsgName'))]"
}
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2020-06-01",
"name": "[variables('ServerNicName')]",
"___location": "[parameters('___location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]"
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[variables('serverSubnetId')]"
}
}
}
]
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2020-06-01",
"name": "JumpBox",
"___location": "[parameters('___location')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
"[resourceId('Microsoft.Network/networkInterfaces', variables('JumpBoxNicName'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"storageProfile": {
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "18.04-LTS",
"version": "latest"
},
"osDisk": {
"createOption": "FromImage"
}
},
"osProfile": {
"computerName": "JumpBox",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPasswordOrKey')]",
"linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), json('null'),
variables('linuxConfiguration'))]"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('JumpBoxNicName'))]"
}
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts',
variables('storageAccountName'))).primaryEndpoints.blob]"
}
}
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2020-06-01",
"name": "Server",
"___location": "[parameters('___location')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
"[resourceId('Microsoft.Network/networkInterfaces', variables('ServerNicName'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"storageProfile": {
"imageReference": {
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "18.04-LTS",
"version": "latest"
},
"osDisk": {
"createOption": "FromImage"
}
},
"osProfile": {
"computerName": "Server",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPasswordOrKey')]",
"linuxConfiguration": "[if(equals(parameters('authenticationType'), 'password'), json('null'),
variables('linuxConfiguration'))]"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('ServerNicName'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts',
variables('storageAccountName'))).primaryEndpoints.blob]"
}
}
}
},
{
"type": "Microsoft.Network/azureFirewalls",
"apiVersion": "2020-06-01",
"name": "[variables('firewallName')]",
"___location": "[parameters('___location')]",
"dependsOn": [
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name1'))]",
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name2'))]",
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
"publicIpCopy"
],
],
"properties": {
"ipConfigurations": "[variables('azureFirewallIpConfigurations')]",
"applicationRuleCollections": [
{
"name": "appRc1",
"properties": {
"priority": 101,
"action": {
"type": "Allow"
},
"rules": [
{
"name": "someAppRule",
"protocols": [
{
"protocolType": "Http",
"port": 8080
}
],
"targetFqdns": [
"*bing.com"
],
"sourceIpGroups": [
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name1'))]"
]
},
{
"name": "someOtherAppRule",
"protocols": [
{
"protocolType": "Mssql",
"port": 1433
}
],
"targetFqdns": [
"[concat('sql1', environment().suffixes.sqlServerHostname)]"
],
"sourceIpGroups": [
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name1'))]",
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name2'))]"
]
}
]
}
}
],
"networkRuleCollections": [
{
"name": "netRc1",
"properties": {
"priority": 200,
"action": {
"type": "Allow"
},
"rules": [
{
"name": "networkRule",
"description": "desc1",
"protocols": [
"UDP",
"TCP",
"ICMP"
],
"sourceAddresses": [
"10.0.0.0",
"111.1.0.0/23"
],
"sourceIpGroups": [
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name1'))]"
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name1'))]"
],
"destinationIpGroups": [
"[resourceId('Microsoft.Network/ipGroups', parameters('ipgroups_name2'))]"
],
"destinationPorts": [
"90"
]
}
]
}
}
]
}
}
]
}
2. In the portal, on the Create an Azure Firewall with IpGroups page, type or select the following
values:
Subscription: Select from existing subscriptions
Resource group: Select from existing resource groups or select Create new , and select OK .
Location: Select a ___location
Virtual Network Name: Type a name for the new virtual network (VNet)
IP Group Name 1: Type name for IP Group 1
IP Group Name 2: Type name for IP Group 2
Admin Username: Type username for the administrator user account
Authentication: Select sshPublicKey or password
Admin Password: Type an administrator password or key
3. Select I agree to the terms and conditions stated above and then select Purchase . The deployment
can take 10 minutes or longer to complete.
To learn about the JSON syntax and properties for a firewall in a template, see Microsoft.Network azureFirewalls
template reference.
Clean up resources
When you no longer need the resources that you created with the firewall, delete the resource group. This
removes the firewall and all the related resources.
To delete the resource group, call the Remove-AzResourceGroup cmdlet:
Next steps
Tutorial: Deploy and configure Azure Firewall in a hybrid network using the Azure portal
Quickstart: Create an Azure Firewall with multiple
public IP addresses - ARM template
8/4/2022 • 5 minutes to read • Edit Online
In this quickstart, you use an Azure Resource Manager template (ARM template) to deploy an Azure Firewall
with multiple public IP addresses from a public IP address prefix. The deployed firewall has NAT rule collection
rules that allow RDP connections to two Windows Server 2019 virtual machines.
An ARM template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for
your project. The template uses declarative syntax. In declarative syntax, you describe your intended deployment
without writing the sequence of programming commands to create the deployment.
For more information about Azure Firewall with multiple public IP addresses, see Deploy an Azure Firewall with
multiple public IP addresses using Azure PowerShell.
If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to
Azure button. The template will open in the Azure portal.
Prerequisites
An Azure account with an active subscription. Create an account for free.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.8.9.13224",
"templateHash": "15231316908103169117"
}
},
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "Admin username for the backend servers"
}
},
"adminPassword": {
"type": "secureString",
"metadata": {
"description": "Password for the admin account on the backend servers"
}
},
"___location": {
"type": "string",
"type": "string",
"defaultValue": "[resourceGroup().___location]",
"metadata": {
"description": "Location for all resources."
}
},
"vmSize": {
"type": "string",
"defaultValue": "Standard_B2ms",
"metadata": {
"description": "Size of the virtual machine."
}
}
},
"variables": {
"copy": [
{
"name": "azureFirewallIpConfigurations",
"count": "[length(range(0, 2))]",
"input": {
"name": "[format('IpConf{0}', add(range(0, 2)[copyIndex('azureFirewallIpConfigurations')], 1))]",
"properties": {
"subnet": "[if(equals(range(0, 2)[copyIndex('azureFirewallIpConfigurations')], 0),
json(format('{{\"id\": \"{0}\"}}', variables('azureFirewallSubnetId'))), json('null'))]",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', format('{0}{1}',
variables('publicIpAddressName'), add(range(0, 2)[range(0, 2)[copyIndex('azureFirewallIpConfigurations')]],
1)))]"
}
}
}
}
],
"virtualMachineName": "myVM",
"virtualNetworkName": "myVNet",
"networkInterfaceName": "net-int",
"ipConfigName": "ipconfig",
"ipPrefixName": "public_ip_prefix",
"ipPrefixSize": 31,
"publicIpAddressName": "public_ip",
"nsgName": "vm-nsg",
"firewallName": "FW-01",
"vnetPrefix": "10.0.0.0/16",
"fwSubnetPrefix": "10.0.0.0/24",
"backendSubnetPrefix": "10.0.1.0/24",
"azureFirewallSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',
variables('virtualNetworkName'), 'AzureFirewallSubnet')]"
},
"resources": [
{
"copy": {
"name": "nsg",
"count": "[length(range(0, 2))]"
},
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2022-01-01",
"name": "[format('{0}{1}', variables('nsgName'), add(range(0, 2)[copyIndex()], 1))]",
"___location": "[parameters('___location')]",
"properties": {
"securityRules": [
{
"name": "RDP",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 300,
"priority": 300,
"direction": "Inbound"
}
}
]
}
},
{
"type": "Microsoft.Network/publicIPPrefixes",
"apiVersion": "2022-01-01",
"name": "[variables('ipPrefixName')]",
"___location": "[parameters('___location')]",
"properties": {
"prefixLength": "[variables('ipPrefixSize')]",
"publicIPAddressVersion": "IPv4"
},
"sku": {
"name": "Standard"
}
},
{
"copy": {
"name": "publicIPAddress",
"count": "[length(range(0, 2))]"
},
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2022-01-01",
"name": "[format('{0}{1}', variables('publicIpAddressName'), add(range(0, 2)[copyIndex()], 1))]",
"___location": "[parameters('___location')]",
"sku": {
"name": "Standard"
},
"properties": {
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Static",
"publicIPPrefix": {
"id": "[resourceId('Microsoft.Network/publicIPPrefixes', variables('ipPrefixName'))]"
},
"idleTimeoutInMinutes": 4
},
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPPrefixes', variables('ipPrefixName'))]"
]
},
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2022-01-01",
"name": "[variables('virtualNetworkName')]",
"___location": "[parameters('___location')]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('vnetPrefix')]"
]
},
"subnets": [
{
"name": "myBackendSubnet",
"properties": {
"addressPrefix": "[variables('backendSubnetPrefix')]",
"routeTable": {
"id": "[resourceId('Microsoft.Network/routeTables', 'rt-01')]"
},
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
}
}
],
"enableDdosProtection": false,
"enableVmProtection": false
"enableVmProtection": false
},
"dependsOn": [
"[resourceId('Microsoft.Network/routeTables', 'rt-01')]"
]
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2022-01-01",
"name": "[format('{0}/{1}', variables('virtualNetworkName'), 'AzureFirewallSubnet')]",
"properties": {
"addressPrefix": "[variables('fwSubnetPrefix')]",
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
]
},
{
"copy": {
"name": "virtualMachine",
"count": "[length(range(0, 2))]"
},
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2022-03-01",
"name": "[format('{0}{1}', variables('virtualMachineName'), add(range(0, 2)[copyIndex()], 1))]",
"___location": "[parameters('___location')]",
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
},
"diskSizeGB": 127
}
},
"osProfile": {
"computerName": "[format('{0}{1}', variables('virtualMachineName'), add(range(0, 2)[copyIndex()],
1))]",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
},
"allowExtensionOperations": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', format('{0}{1}',
variables('networkInterfaceName'), add(range(0, 2)[range(0, 2)[copyIndex()]], 1)))]"
}
]
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', format('{0}{1}',
variables('networkInterfaceName'), add(range(0, 2)[range(0, 2)[copyIndex()]], 1)))]"
]
},
{
"copy": {
"name": "netInterface",
"count": "[length(range(0, 2))]"
},
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2022-01-01",
"name": "[format('{0}{1}', variables('networkInterfaceName'), add(range(0, 2)[copyIndex()], 1))]",
"___location": "[parameters('___location')]",
"properties": {
"ipConfigurations": [
{
"name": "[format('{0}{1}', variables('ipConfigName'), add(range(0, 2)[copyIndex()], 1))]",
"properties": {
"subnet": {
"id": "[reference(resourceId('Microsoft.Network/virtualNetworks',
variables('virtualNetworkName'))).subnets[0].id]"
},
"primary": true
}
}
],
"enableAcceleratedNetworking": false,
"enableIPForwarding": false,
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', format('{0}{1}',
variables('nsgName'), add(range(0, 2)[range(0, 2)[copyIndex()]], 1)))]"
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups', format('{0}{1}', variables('nsgName'),
add(range(0, 2)[range(0, 2)[copyIndex()]], 1)))]",
"[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
]
},
{
"type": "Microsoft.Network/azureFirewalls",
"apiVersion": "2022-01-01",
"name": "[variables('firewallName')]",
"___location": "[parameters('___location')]",
"properties": {
"sku": {
"name": "AZFW_VNet",
"tier": "Standard"
},
"threatIntelMode": "Alert",
"ipConfigurations": "[variables('azureFirewallIpConfigurations')]",
"applicationRuleCollections": [
{
"name": "web",
"properties": {
"priority": 100,
"action": {
"type": "Allow"
},
"rules": [
{
"name": "wan-address",
"protocols": [
{
"protocolType": "Http",
"port": 80
},
{
"protocolType": "Https",
"port": 443
}
],
"targetFqdns": [
"getmywanip.com"
],
"sourceAddresses": [
"*"
]
},
{
"name": "google",
"protocols": [
{
"protocolType": "Http",
"port": 80
},
{
"protocolType": "Https",
"port": 443
}
],
"targetFqdns": [
"www.google.com"
],
"sourceAddresses": [
"10.0.1.0/24"
]
},
{
"name": "wupdate",
"protocols": [
{
"protocolType": "Http",
"port": 80
},
{
"protocolType": "Https",
"port": 443
}
],
"fqdnTags": [
"WindowsUpdate"
],
"sourceAddresses": [
"*"
]
}
]
}
}
],
"natRuleCollections": [
{
"name": "Coll-01",
"properties": {
"priority": 100,
"action": {
"type": "Dnat"
},
"rules": [
{
"name": "rdp-01",
"protocols": [
"TCP"
],
"translatedAddress": "10.0.1.4",
"translatedPort": "3389",
"translatedPort": "3389",
"sourceAddresses": [
"*"
],
"destinationAddresses": [
"[reference(resourceId('Microsoft.Network/publicIPAddresses', format('{0}{1}',
variables('publicIpAddressName'), add(range(0, 2)[0], 1)))).ipAddress]"
],
"destinationPorts": [
"3389"
]
},
{
"name": "rdp-02",
"protocols": [
"TCP"
],
"translatedAddress": "10.0.1.5",
"translatedPort": "3389",
"sourceAddresses": [
"*"
],
"destinationAddresses": [
"[reference(resourceId('Microsoft.Network/publicIPAddresses', format('{0}{1}',
variables('publicIpAddressName'), add(range(0, 2)[1], 1)))).ipAddress]"
],
"destinationPorts": [
"3389"
]
}
]
}
}
]
},
"dependsOn": [
"publicIPAddress",
"[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'),
'AzureFirewallSubnet')]"
]
},
{
"type": "Microsoft.Network/routeTables",
"apiVersion": "2022-01-01",
"name": "rt-01",
"___location": "[parameters('___location')]",
"properties": {
"disableBgpRoutePropagation": false,
"routes": [
{
"name": "fw",
"properties": {
"addressPrefix": "0.0.0.0/0",
"nextHopType": "VirtualAppliance",
"nextHopIpAddress": "10.0.0.4"
}
}
]
}
}
]
}
2. In the portal, on the Create an Azure Firewall with multiple IP public addresses page, type or
select the following values:
Subscription: Select from existing subscriptions
Resource group: Select from existing resource groups or select Create new , and select OK .
Location: Select a ___location
Admin Username: Type username for the administrator user account
Admin Password: Type an administrator password or key
3. Select I agree to the terms and conditions stated above and then select Purchase . The deployment
can take 10 minutes or longer to complete.
Clean up resources
When you no longer need the resources that you created with the firewall, delete the resource group. This
removes the firewall and all the related resources.
To delete the resource group, call the Remove-AzResourceGroup cmdlet:
Next steps
Tutorial: Deploy and configure Azure Firewall in a hybrid network using the Azure portal
Quickstart: Deploy Azure Firewall with Availability
Zones - Bicep
8/4/2022 • 5 minutes to read • Edit Online
In this quickstart, you use Bicep to deploy an Azure Firewall in three Availability Zones.
Bicep is a ___domain-specific language (DSL) that uses declarative syntax to deploy Azure resources. It provides
concise syntax, reliable type safety, and support for code reuse. Bicep offers the best authoring experience for
your infrastructure-as-code solutions in Azure.
The Bicep file creates a test network environment with a firewall. The network has one virtual network (VNet)
with three subnets: AzureFirewallSubnet, ServersSubnet, and JumpboxSubnet. The ServersSubnet and
JumpboxSubnet subnet each have a single, two-core Windows Server virtual machine.
The firewall is in the AzureFirewallSubnet subnet, and has an application rule collection with a single rule that
allows access to www.microsoft.com .
A user-defined route points network traffic from the ServersSubnet subnet through the firewall, where the
firewall rules are applied.
For more information about Azure Firewall, see Deploy and configure Azure Firewall using the Azure portal.
Prerequisites
An Azure account with an active subscription. Create an account for free.
CLI
PowerShell
NOTE
Replace <admin-user> with the administrator login username for the virtual machine. You'll be prompted to
enter adminPassword .
When the deployment finishes, you should see a message indicating the deployment succeeded.
CLI
CLI
PowerShell
To learn about the syntax and properties for a firewall in a Bicep file, see Microsoft.Network/azureFirewalls.
Clean up resources
When you no longer need them, use the Azure portal, Azure CLI, or Azure PowerShell to remove the resource
group, firewall, and all related resources.
CLI
PowerShell
Next steps
Next, you can monitor the Azure Firewall logs.
Tutorial: Monitor Azure Firewall logs
Quickstart: Deploy Azure Firewall with Availability
Zones - ARM template
8/4/2022 • 6 minutes to read • Edit Online
In this quickstart, you use an Azure Resource Manager template (ARM template) to deploy an Azure Firewall in
three Availability Zones.
An ARM template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for
your project. The template uses declarative syntax. In declarative syntax, you describe your intended deployment
without writing the sequence of programming commands to create the deployment.
The template creates a test network environment with a firewall. The network has one virtual network (VNet)
with three subnets: AzureFirewallSubnet, ServersSubnet, and JumpboxSubnet. The ServersSubnet and
JumpboxSubnet subnet each have a single, two-core Windows Server virtual machine.
The firewall is in the AzureFirewallSubnet subnet, and has an application rule collection with a single rule that
allows access to www.microsoft.com .
A user-defined route points network traffic from the ServersSubnet subnet through the firewall, where the
firewall rules are applied.
For more information about Azure Firewall, see Deploy and configure Azure Firewall using the Azure portal.
If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to
Azure button. The template will open in the Azure portal.
Prerequisites
An Azure account with an active subscription. Create an account for free.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.7.4.23292",
"templateHash": "1131141795323801257"
}
},
"parameters": {
"virtualNetworkName": {
"type": "string",
"defaultValue": "test-vnet",
"metadata": {
"description": "virtual network name"
"description": "virtual network name"
}
},
"___location": {
"type": "string",
"defaultValue": "[resourceGroup().___location]",
"metadata": {
"description": "Location for all resources."
}
},
"adminUsername": {
"type": "string",
"metadata": {
"description": "Username for the Virtual Machine."
}
},
"adminPassword": {
"type": "secureString",
"metadata": {
"description": "Password for the Virtual Machine."
}
},
"availabilityZones": {
"type": "array",
"defaultValue": [
"1",
"2",
"3"
],
"metadata": {
"description": "Availability zone numbers e.g. 1,2,3."
}
},
"numberOfFirewallPublicIPAddresses": {
"type": "int",
"defaultValue": 1,
"maxValue": 100,
"minValue": 1,
"metadata": {
"description": "Number of public IP addresses for the Azure Firewall"
}
},
"jumpBoxSize": {
"type": "string",
"defaultValue": "Standard_D2s_v3",
"metadata": {
"description": "Size of the virtual machine."
}
},
"serverSize": {
"type": "string",
"defaultValue": "Standard_D2s_v3",
"metadata": {
"description": "Size of the virtual machine."
}
}
},
"variables": {
"copy": [
{
"name": "azureFirewallIpConfigurations",
"count": "[length(range(0, parameters('numberOfFirewallPublicIPAddresses')))]",
"input": {
"name": "[format('IpConf{0}', range(0, parameters('numberOfFirewallPublicIPAddresses'))
[copyIndex('azureFirewallIpConfigurations')])]",
"properties": {
"subnet": "[if(equals(range(0, parameters('numberOfFirewallPublicIPAddresses'))
[copyIndex('azureFirewallIpConfigurations')], 0), variables('azureFirewallSubnetJSON'), json('null'))]",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', format('{0}{1}',
"id": "[resourceId('Microsoft.Network/publicIPAddresses', format('{0}{1}',
variables('publicIPNamePrefix'), add(range(0, parameters('numberOfFirewallPublicIPAddresses'))[range(0,
parameters('numberOfFirewallPublicIPAddresses'))[copyIndex('azureFirewallIpConfigurations')]], 1)))]"
}
}
}
}
],
"vnetAddressPrefix": "10.0.0.0/16",
"serversSubnetPrefix": "10.0.2.0/24",
"azureFirewallSubnetPrefix": "10.0.1.0/24",
"jumpboxSubnetPrefix": "10.0.0.0/24",
"nextHopIP": "10.0.1.4",
"azureFirewallSubnetName": "AzureFirewallSubnet",
"jumpBoxSubnetName": "JumpboxSubnet",
"serversSubnetName": "ServersSubnet",
"jumpBoxPublicIPAddressName": "JumpHostPublicIP",
"jumpBoxNsgName": "JumpHostNSG",
"jumpBoxNicName": "JumpHostNic",
"jumpBoxSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',
parameters('virtualNetworkName'), variables('jumpBoxSubnetName'))]",
"serverNicName": "ServerNic",
"serverSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',
parameters('virtualNetworkName'), variables('serversSubnetName'))]",
"storageAccountName": "[format('{0}sajumpbox', uniqueString(resourceGroup().id))]",
"azfwRouteTableName": "AzfwRouteTable",
"firewallName": "firewall1",
"publicIPNamePrefix": "publicIP",
"azureFirewallSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets',
parameters('virtualNetworkName'), variables('azureFirewallSubnetName'))]",
"azureFirewallSubnetJSON": "[json(format('{{\"id\": \"{0}\"}}', variables('azureFirewallSubnetId')))]",
"networkSecurityGroupName": "[format('{0}-nsg', variables('serversSubnetName'))]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2021-08-01",
"name": "[variables('storageAccountName')]",
"___location": "[parameters('___location')]",
"sku": {
"name": "Standard_LRS"
},
"kind": "Storage",
"properties": {}
},
{
"type": "Microsoft.Network/routeTables",
"apiVersion": "2021-03-01",
"name": "[variables('azfwRouteTableName')]",
"___location": "[parameters('___location')]",
"properties": {
"disableBgpRoutePropagation": false,
"routes": [
{
"name": "AzfwDefaultRoute",
"properties": {
"addressPrefix": "0.0.0.0/0",
"nextHopType": "VirtualAppliance",
"nextHopIpAddress": "[variables('nextHopIP')]"
}
}
]
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2021-03-01",
"name": "[variables('networkSecurityGroupName')]",
"___location": "[parameters('___location')]",
"properties": {}
"properties": {}
},
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2021-05-01",
"name": "[parameters('virtualNetworkName')]",
"___location": "[parameters('___location')]",
"tags": {
"displayName": "[parameters('virtualNetworkName')]"
},
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('vnetAddressPrefix')]"
]
},
"subnets": [
{
"name": "[variables('jumpBoxSubnetName')]",
"properties": {
"addressPrefix": "[variables('jumpboxSubnetPrefix')]"
}
},
{
"name": "[variables('azureFirewallSubnetName')]",
"properties": {
"addressPrefix": "[variables('azureFirewallSubnetPrefix')]"
}
},
{
"name": "[variables('serversSubnetName')]",
"properties": {
"addressPrefix": "[variables('serversSubnetPrefix')]",
"routeTable": {
"id": "[resourceId('Microsoft.Network/routeTables', variables('azfwRouteTableName'))]"
},
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups',
variables('networkSecurityGroupName'))]"
}
}
}
]
},
"dependsOn": [
"[resourceId('Microsoft.Network/routeTables', variables('azfwRouteTableName'))]",
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
]
},
{
"copy": {
"name": "publicIPAddress",
"count": "[length(range(0, parameters('numberOfFirewallPublicIPAddresses')))]"
},
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2021-03-01",
"name": "[format('{0}{1}', variables('publicIPNamePrefix'), add(range(0,
parameters('numberOfFirewallPublicIPAddresses'))[copyIndex()], 1))]",
"___location": "[parameters('___location')]",
"sku": {
"name": "Standard"
},
"properties": {
"publicIPAllocationMethod": "Static",
"publicIPAddressVersion": "IPv4"
},
"zones": "[parameters('availabilityZones')]"
},
{
"type": "Microsoft.Network/publicIPAddresses",
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2021-03-01",
"name": "[variables('jumpBoxPublicIPAddressName')]",
"___location": "[parameters('___location')]",
"properties": {
"publicIPAllocationMethod": "Dynamic"
}
},
{
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2021-05-01",
"name": "[variables('jumpBoxNsgName')]",
"___location": "[parameters('___location')]",
"properties": {
"securityRules": [
{
"name": "myNetworkSecurityGroupRuleRDP",
"properties": {
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "3389",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 1000,
"direction": "Inbound"
}
}
]
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2021-05-01",
"name": "[variables('jumpBoxNicName')]",
"___location": "[parameters('___location')]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses',
variables('jumpBoxPublicIPAddressName'))]"
},
"subnet": {
"id": "[variables('jumpBoxSubnetId')]"
}
}
}
],
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('jumpBoxNsgName'))]"
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/networkSecurityGroups', variables('jumpBoxNsgName'))]",
"[resourceId('Microsoft.Network/publicIPAddresses', variables('jumpBoxPublicIPAddressName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]"
]
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2021-05-01",
"name": "[variables('serverNicName')]",
"___location": "[parameters('___location')]",
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"subnet": {
"id": "[variables('serverSubnetId')]"
}
}
}
]
},
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]"
]
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2021-11-01",
"name": "JumpBox",
"___location": "[parameters('___location')]",
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('jumpBoxSize')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"createOption": "FromImage",
"diskSizeGB": 127
}
},
"osProfile": {
"computerName": "JumpBox",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('jumpBoxNicName'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts',
variables('storageAccountName'))).primaryEndpoints.blob]"
}
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', variables('jumpBoxNicName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
]
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2021-11-01",
"name": "Server",
"___location": "[parameters('___location')]",
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('serverSize')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"osType": "Windows",
"createOption": "FromImage",
"diskSizeGB": 127
}
},
"osProfile": {
"computerName": "Server",
"adminUsername": "[parameters('adminUsername')]",
"adminPassword": "[parameters('adminPassword')]"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('serverNicName'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts',
variables('storageAccountName'))).primaryEndpoints.blob]"
}
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', variables('serverNicName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
]
},
{
"type": "Microsoft.Network/azureFirewalls",
"apiVersion": "2021-05-01",
"name": "[variables('firewallName')]",
"___location": "[parameters('___location')]",
"zones": "[if(equals(length(parameters('availabilityZones')), 0), json('null'),
parameters('availabilityZones'))]",
"properties": {
"ipConfigurations": "[variables('azureFirewallIpConfigurations')]",
"applicationRuleCollections": [
{
"name": "appRc1",
"properties": {
"priority": 101,
"action": {
"type": "Allow"
},
"rules": [
{
"name": "appRule1",
"protocols": [
{
"port": 80,
"protocolType": "Http"
},
{
"port": 443,
"protocolType": "Https"
}
}
],
"targetFqdns": [
"www.microsoft.com"
],
"sourceAddresses": [
"10.0.2.0/24"
]
}
]
}
}
],
"networkRuleCollections": [
{
"name": "netRc1",
"properties": {
"priority": 200,
"action": {
"type": "Allow"
},
"rules": [
{
"name": "netRule1",
"protocols": [
"TCP"
],
"sourceAddresses": [
"10.0.2.0/24"
],
"destinationAddresses": [
"*"
],
"destinationPorts": [
"8000-8999"
]
}
]
}
}
]
},
"dependsOn": [
"publicIPAddress",
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]"
]
}
]
}
2. In the portal, on the Create a sandbox setup of Azure Firewall with Zones page, type or select the
following values:
Resource group : Select Create new , type a name for the resource group, and select OK .
Vir tual Network Name : Type a name for the new VNet.
Admin Username : Type a username for the administrator user account.
Admin Password : Type an administrator password.
3. Read the terms and conditions, and then select I agree to the terms and conditions stated above
and then select Purchase . The deployment can take 10 minutes or longer to complete.
Clean up resources
When you no longer need them, you can remove the resource group, firewall, and all related resources by
running the Remove-AzResourceGroup PowerShell command. To remove a resource group named
MyResourceGroup, run:
Don't remove the resource group and firewall if you plan to continue on to the firewall monitoring tutorial.
Next steps
Next, you can monitor the Azure Firewall logs.
Tutorial: Monitor Azure Firewall logs
Tutorial: Deploy and configure Azure Firewall and
policy using the Azure portal
8/4/2022 • 7 minutes to read • Edit Online
Controlling outbound network access is an important part of an overall network security plan. For example, you
may want to limit access to web sites. Or, you may want to limit the outbound IP addresses and ports that can be
accessed.
One way you can control outbound network access from an Azure subnet is with Azure Firewall and Firewall
Policy. With Azure Firewall and Firewall Policy, you can configure:
Application rules that define fully qualified ___domain names (FQDNs) that can be accessed from a subnet.
Network rules that define source address, protocol, destination port, and destination address.
Network traffic is subjected to the configured firewall rules when you route your network traffic to the firewall
as the subnet default gateway.
For this tutorial, you create a simplified single VNet with two subnets for easy deployment.
For production deployments, a hub and spoke model is recommended, where the firewall is in its own VNet. The
workload servers are in peered VNets in the same region with one or more subnets.
AzureFirewallSubnet - the firewall is in this subnet.
Workload-SN - the workload server is in this subnet. This subnet's network traffic goes through the firewall.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall FAQ.
1. On the Azure portal menu or from the Home page, select Create a resource .
2. Select Networking .
3. Search for Vir tual network and select it.
4. Select Create .
5. For Subscription , select your subscription.
6. For Resource group , select Test-FW-RG .
7. For Name , type Test-FW-VN .
8. For Region , select the same ___location that you used previously.
9. Select Next: IP addresses .
10. For IPv4 Address space , accept the default 10.0.0.0/16 .
11. Under Subnet , select default .
12. For Subnet name change the name to AzureFirewallSubnet . The firewall will be in this subnet, and
the subnet name must be AzureFirewallSubnet.
13. For Address range , type 10.0.1.0/26 .
14. Select Save .
Next, create a subnet for the workload server.
15. Select Add subnet .
16. For Subnet name , type Workload-SN .
17. For Subnet address range , type 10.0.2.0/24 .
18. Select Add .
19. Select Review + create .
20. Select Create .
Create a virtual machine
Now create the workload virtual machine, and place it in the Workload-SN subnet.
1. On the Azure portal menu or from the Home page, select Create a resource .
2. Select Windows Ser ver 2016 Datacenter .
3. Enter these values for the virtual machine:
SET T IN G VA L UE
SET T IN G VA L UE
Name Test-FW01
Clean up resources
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the Test-FW-RG
resource group to delete all firewall-related resources.
Next steps
Deploy and configure Azure Firewall Premium
Tutorial: Deploy and configure Azure Firewall and
policy in a hybrid network using the Azure portal
8/4/2022 • 14 minutes to read • Edit Online
When you connect your on-premises network to an Azure virtual network to create a hybrid network, the ability
to control access to your Azure network resources is an important part of an overall security plan.
You can use Azure Firewall and Firewall Policy to control network access in a hybrid network using rules that
define allowed and denied network traffic.
For this tutorial, you create three virtual networks:
VNet-Hub - the firewall is in this virtual network.
VNet-Spoke - the spoke virtual network represents the workload located on Azure.
VNet-Onprem - The on-premises virtual network represents an on-premises network. In an actual
deployment, it can be connected by either a VPN or ExpressRoute connection. For simplicity, this tutorial uses
a VPN gateway connection, and an Azure-located virtual network is used to represent an on-premises
network.
Prerequisites
A hybrid network uses the hub-and-spoke architecture model to route traffic between Azure VNets and on-
premises networks. The hub-and-spoke architecture has the following requirements:
Set Use this vir tual network's gateway or Route Ser ver when peering VNet-Hub to VNet-Spoke. In
a hub-and-spoke network architecture, a gateway transit allows the spoke virtual networks to share the
VPN gateway in the hub, instead of deploying VPN gateways in every spoke virtual network.
Additionally, routes to the gateway-connected virtual networks or on-premises networks will
automatically propagate to the routing tables for the peered virtual networks using the gateway transit.
For more information, see Configure VPN gateway transit for virtual network peering.
Set Use the remote vir tual network's gateways or Route Ser ver when you peer VNet-Spoke to
VNet-Hub. If Use the remote vir tual network's gateways or Route Ser ver is set and Use this
vir tual network's gateway or Route Ser ver on remote peering is also set, the spoke virtual network
uses gateways of the remote virtual network for transit.
To route the spoke subnet traffic through the hub firewall, you can use a User Defined route (UDR) that
points to the firewall with the Vir tual network gateway route propagation option disabled. The
Vir tual network gateway route propagation disabled option prevents route distribution to the
spoke subnets. This prevents learned routes from conflicting with your UDR. If you want to keep Vir tual
network gateway route propagation enabled, make sure to define specific routes to the firewall to
override those that are published from on-premises over BGP.
Configure a UDR on the hub gateway subnet that points to the firewall IP address as the next hop to the
spoke networks. No UDR is required on the Azure Firewall subnet, as it learns routes from BGP.
See the Create Routes section in this tutorial to see how these routes are created.
NOTE
Azure Firewall must have direct Internet connectivity. If your AzureFirewallSubnet learns a default route to your on-
premises network via BGP, you must override this with a 0.0.0.0/0 UDR with the NextHopType value set as Internet to
maintain direct Internet connectivity.
Azure Firewall can be configured to support forced tunneling. For more information, see Azure Firewall forced tunneling.
NOTE
Traffic between directly peered VNets is routed directly even if a UDR points to Azure Firewall as the default gateway. To
send subnet to subnet traffic to the firewall in this scenario, a UDR must contain the target subnet network prefix explicitly
on both subnets.
If you don't have an Azure subscription, create a free account before you begin.
SET T IN G VA L UE
Name AzFW01
Region East US
SET T IN G N A M E VA L UE
SET T IN G N A M E VA L UE
Set-AzVMExtension `
-ResourceGroupName FW-Hybrid-Test `
-ExtensionName IIS `
-VMName VM-Spoke-01 `
-Publisher Microsoft.Compute `
-ExtensionType CustomScriptExtension `
-TypeHandlerVersion 1.4 `
-SettingString '{"commandToExecute":"powershell Add-WindowsFeature Web-Server; powershell
Add-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\" -Value $($env:computername)"}' `
-Location EastUS
NOTE
Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the back-end
pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP
address that isn't configurable.
For more information, see Default outbound access in Azure.
The default outbound access IP is disabled when either a public IP address is assigned to the VM or the VM is placed in
the back-end pool of a standard load balancer, with or without outbound rules. If an Azure Virtual Network network
address translation (NAT) gateway resource is assigned to the subnet of the virtual machine, the default outbound access
IP is disabled.
VMs that are created by virtual machine scale sets in flexible orchestration mode don't have default outbound access.
For more information about outbound connections in Azure, see Use source network address translation (SNAT) for
outbound connections.
Clean up resources
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the FW-Hybrid-Test
resource group to delete all firewall-related resources.
Next steps
Deploy and configure Azure Firewall Premium
Tutorial: Filter inbound Internet traffic with Azure
Firewall policy DNAT using the Azure portal
8/4/2022 • 5 minutes to read • Edit Online
You can configure Azure Firewall policy Destination Network Address Translation (DNAT) to translate and filter
inbound Internet traffic to your subnets. When you configure DNAT, the rule collection action is set to DNAT .
Each rule in the NAT rule collection can then be used to translate your firewall public IP address and port to a
private IP address and port. DNAT rules implicitly add a corresponding network rule to allow the translated
traffic. For security reasons, the recommended approach is to add a specific Internet source to allow DNAT
access to the network and avoid using wildcards. To learn more about Azure Firewall rule processing logic, see
Azure Firewall rule processing logic.
In this tutorial, you learn how to:
Set up a test network environment
Deploy a firewall and policy
Create a default route
Configure a DNAT rule
Test the firewall
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall
FAQ.
SET T IN G VA L UE
Name FW-DNAT-test
Clean up resources
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the RG-DNAT-Test
resource group to delete all firewall-related resources.
Next steps
Deploy and configure Azure Firewall Premium
Azure Firewall PowerShell samples
8/4/2022 • 2 minutes to read • Edit Online
The following table includes links to Azure PowerShell script samples that create firewalls:
SA M P L E DESC RIP T IO N
Create an Azure Firewall and test infrastructure Creates an Azure Firewall and a test network infrastructure.
Azure Firewall Standard features
8/4/2022 • 8 minutes to read • Edit Online
Azure Firewall Standard is a managed, cloud-based network security service that protects your Azure Virtual
Network resources.
Availability Zones
Azure Firewall can be configured during deployment to span multiple Availability Zones for increased
availability. With Availability Zones, your availability increases to 99.99% uptime. For more information, see the
Azure Firewall Service Level Agreement (SLA). The 99.99% uptime SLA is offered when two or more Availability
Zones are selected.
You can also associate Azure Firewall to a specific zone just for proximity reasons, using the service standard
99.95% SLA.
There's no additional cost for a firewall deployed in more than one Availability Zone. However, there are added
costs for inbound and outbound data transfers associated with Availability Zones. For more information, see
Bandwidth pricing details.
Azure Firewall Availability Zones are available in regions that support Availability Zones. For more information,
see Regions that support Availability Zones in Azure
NOTE
Availability Zones can only be configured during deployment. You can't configure an existing firewall to include Availability
Zones.
For more information about Availability Zones, see Regions and Availability Zones in Azure.
FQDN tags
FQDN tags make it easy for you to allow well-known Azure service network traffic through your firewall. For
example, say you want to allow Windows Update network traffic through your firewall. You create an application
rule and include the Windows Update tag. Now network traffic from Windows Update can flow through your
firewall.
Service tags
A service tag represents a group of IP address prefixes to help minimize complexity for security rule creation.
You can't create your own service tag, nor specify which IP addresses are included within a tag. Microsoft
manages the address prefixes encompassed by the service tag, and automatically updates the service tag as
addresses change.
Threat intelligence
Threat intelligence-based filtering can be enabled for your firewall to alert and deny traffic from/to known
malicious IP addresses and domains. The IP addresses and domains are sourced from the Microsoft Threat
Intelligence feed.
DNS proxy
With DNS proxy enabled, Azure Firewall can process and forward DNS queries from a Virtual Network(s) to
your desired DNS server. This functionality is crucial and required to have reliable FQDN filtering in network
rules. You can enable DNS proxy in Azure Firewall and Firewall Policy settings. To learn more about DNS proxy,
see Azure Firewall DNS settings.
Custom DNS
Custom DNS allows you to configure Azure Firewall to use your own DNS server, while ensuring the firewall
outbound dependencies are still resolved with Azure DNS. You may configure a single DNS server or multiple
servers in Azure Firewall and Firewall Policy DNS settings. Learn more about Custom DNS, see Azure Firewall
DNS settings.
Azure Firewall can also resolve names using Azure Private DNS. The virtual network where the Azure Firewall
resides must be linked to the Azure Private Zone. To learn more, see Using Azure Firewall as DNS Forwarder
with Private Link.
Forced tunneling
You can configure Azure Firewall to route all Internet-bound traffic to a designated next hop instead of going
directly to the Internet. For example, you may have an on-premises edge firewall or other network virtual
appliance (NVA) to process network traffic before it's passed to the Internet. For more information, see Azure
Firewall forced tunneling.
Web categories
Web categories lets administrators allow or deny user access to web site categories such as gambling websites,
social media websites, and others. Web categories are included in Azure Firewall Standard, but it's more fine-
tuned in Azure Firewall Premium. As opposed to the Web categories capability in the Standard SKU that matches
the category based on an FQDN, the Premium SKU matches the category according to the entire URL for both
HTTP and HTTPS traffic. For more information about Azure Firewall Premium, see Azure Firewall Premium
features.
For example, if Azure Firewall intercepts an HTTPS request for www.google.com/news , the following categorization
is expected:
Firewall Standard – only the FQDN part will be examined, so www.google.com will be categorized as
Search Engine.
Firewall Premium – the complete URL will be examined, so www.google.com/news will be categorized as
News.
The categories are organized based on severity under Liability , High-Bandwidth , Business Use ,
Productivity Loss , General Surfing , and Uncategorized .
Category exceptions
You can create exceptions to your web category rules. Create a separate allow or deny rule collection with a
higher priority within the rule collection group. For example, you can configure a rule collection that allows
www.linkedin.com with priority 100, with a rule collection that denies Social networking with priority 200. This
creates the exception for the pre-defined Social networking web category.
Certifications
Azure Firewall is Payment Card Industry (PCI), Service Organization Controls (SOC), International Organization
for Standardization (ISO), and ICSA Labs compliant. For more information, see Azure Firewall compliance
certifications.
Next steps
Azure Firewall Premium features
Azure Firewall Premium features
8/4/2022 • 9 minutes to read • Edit Online
Azure Firewall Premium provides advanced threat protection that meets the needs of highly sensitive and
regulated environments, such as the payment and healthcare industries.
Organizations can use Premium stock-keeping unit (SKU) features like IDPS and TLS inspection to prevent
malware and viruses from spreading across networks in both lateral and horizontal directions. To meet the
increased performance demands of IDPS and TLS inspection, Azure Firewall Premium uses a more powerful
virtual machine SKU. Like the Standard SKU, the Premium SKU can seamlessly scale up to 30 Gbps and integrate
with availability zones to support the service level agreement (SLA) of 99.99 percent. The Premium SKU
complies with Payment Card Industry Data Security Standard (PCI DSS) environment needs.
TLS inspection
The TLS (Transport Layer Security) protocol primarily provides cryptography for privacy, integrity, and
authenticity using certificates between two or more communicating applications. It runs in the application layer
and is widely used to encrypt the HTTP protocol.
Encrypted traffic has a possible security risk and can hide illegal user activity and malicious traffic. Azure Firewall
without TLS inspection (as shown in the following diagram) has no visibility into the data that flows in the
encrypted TLS tunnel, and so can't provide a full protection coverage.
The second diagram shows how Azure Firewall Premium terminates and inspects TLS connections to detect,
alert, and mitigate malicious activity in HTTPS. The firewall actually creates two dedicated TLS connections: one
with the Web Server (contoso.com) and another connection with the client. Using the customer provided CA
certificate, it generates an on-the-fly certificate, which replaces the Web Server certificate and shares it with the
client to establish the TLS connection between the firewall and the client.
Azure Firewall without TLS inspection:
TIP
TLS 1.0 and 1.1 are being deprecated and won’t be supported. TLS 1.0 and 1.1 versions of TLS/Secure Sockets Layer (SSL)
have been found to be vulnerable, and while they still currently work to allow backwards compatibility, they aren't
recommended. Migrate to TLS 1.2 as soon as possible.
To learn more about Azure Firewall Premium Intermediate CA certificate requirements, see Azure Firewall
Premium certificates.
IDPS
A network intrusion detection and prevention system (IDPS) allows you to monitor your network for malicious
activity, log information about this activity, report it, and optionally attempt to block it.
Azure Firewall Premium provides signature-based IDPS to allow rapid detection of attacks by looking for
specific patterns, such as byte sequences in network traffic, or known malicious instruction sequences used by
malware. The IDPS signatures are applicable for both application and network level traffic (Layers 3-7), they're
fully managed, and continuously updated. IDPS can be applied to inbound, spoke-to-spoke (East-West), and
outbound traffic. Spoke-to-spoke (East-West) includes traffic that goes from/to an on-premises network. You
can configure your IDPS private IP address ranges using the Private IP ranges preview feature. For more
information, see Azure Firewall preview features.
The Azure Firewall signatures/rulesets include:
An emphasis on fingerprinting actual malware, Command and Control, exploit kits, and in the wild malicious
activity missed by traditional prevention methods.
Over 58,000 rules in over 50 categories.
The categories include malware command and control, phishing, trojans, botnets, informational
events, exploits, vulnerabilities, SCADA network protocols, exploit kit activity, and more.
20 to 40+ new rules are released each day.
Low false positive rating by using state-of-the-art malware sandbox and global sensor network feedback
loop.
IDPS allows you to detect attacks in all ports and protocols for non-encrypted traffic. However, when HTTPS
traffic needs to be inspected, Azure Firewall can use its TLS inspection capability to decrypt the traffic and better
detect malicious activities.
The IDPS Bypass List allows you to not filter traffic to any of the IP addresses, ranges, and subnets specified in
the bypass list.
IDPS signature rules
IDPS signature rules allow you to:
Customize one or more signatures and change their mode to Disabled, Alert or Alert and Deny.
For example, if you receive a false positive where a legitimate request is blocked by Azure Firewall due to
a faulty signature, you can use the signature ID from the network rules logs, and set its IDPS mode to off.
This causes the "faulty" signature to be ignored and resolves the false positive issue.
You can apply the same fine-tuning procedure for signatures that are creating too many low-priority
alerts, and therefore interfering with visibility for high-priority alerts.
Get a holistic view of the entire 55,000 signatures
Smart search
Allows you to search through the entire signatures database by any type of attribute. For example, you
can search for specific CVE-ID to discovered what signatures are taking care of this CVE by typing the ID
in the search bar.
IDPS signature rules have the following properties:
C O L UM N DESC RIP T IO N
Note: IDPS alerts are available in the portal via network rule
log query.
Last updated The last date that this signature was introduced or modified.
URL filtering
URL filtering extends Azure Firewall’s FQDN filtering capability to consider an entire URL. For example,
www.contoso.com/a/c instead of www.contoso.com .
URL Filtering can be applied both on HTTP and HTTPS traffic. When HTTPS traffic is inspected, Azure Firewall
Premium can use its TLS inspection capability to decrypt the traffic and extract the target URL to validate
whether access is permitted. TLS inspection requires opt-in at the application rule level. Once enabled, you can
use URLs for filtering with HTTPS.
Web categories
Web categories lets administrators allow or deny user access to web site categories such as gambling websites,
social media websites, and others. Web categories will also be included in Azure Firewall Standard, but it will be
more fine-tuned in Azure Firewall Premium. As opposed to the Web categories capability in the Standard SKU
that matches the category based on an FQDN, the Premium SKU matches the category according to the entire
URL for both HTTP and HTTPS traffic.
For example, if Azure Firewall intercepts an HTTPS request for www.google.com/news , the following categorization
is expected:
Firewall Standard – only the FQDN part will be examined, so www.google.com will be categorized as
Search Engine.
Firewall Premium – the complete URL will be examined, so www.google.com/news will be categorized as
News.
The categories are organized based on severity under Liability , High-Bandwidth , Business Use ,
Productivity Loss , General Surfing , and Uncategorized . For a detailed description of the web categories,
see Azure Firewall web categories.
Web category logging
You can view traffic that has been filtered by Web categories in the Application logs. Web categories field is
only displayed if it has been explicitly configured in your firewall policy application rules. For example, if you
don't have a rule that explicitly denies Search Engines, and a user requests to go to www.bing.com, only a default
deny message is displayed as opposed to a Web categories message. This is because the web category wasn't
explicitly configured.
Category exceptions
You can create exceptions to your web category rules. Create a separate allow or deny rule collection with a
higher priority within the rule collection group. For example, you can configure a rule collection that allows
www.linkedin.com with priority 100, with a rule collection that denies Social networking with priority 200. This
creates the exception for the pre-defined Social networking web category.
Web category search
You can identify what category a given FQDN or URL is by using the Web Categor y Check feature. To use this,
select the Web Categories tab under Firewall Policy Settings . This is useful when defining your application
rules for destination traffic.
Category change
Under the Web Categories tab in Firewall Policy Settings , you can request a categorization change if you:
think an FQDN or URL should be under a different category
or
have a suggested category for an uncategorized FQDN or URL
Once you submit a category change report, you'll be given a token in the notifications that indicate that we've
received the request for processing. You can check whether the request is in progress, denied, or approved by
entering the token in the search bar. Be sure to save your token ID to do so.
Supported regions
For the supported regions for Azure Firewall, see Azure products available by region.
Next steps
Learn about Azure Firewall Premium certificates
Deploy and configure Azure Firewall Premium
Migrate to Azure Firewall Premium
Azure Firewall preview features
8/4/2022 • 7 minutes to read • Edit Online
The following Azure Firewall preview features are available publicly for you to deploy and test. Some of the
preview features are available on the Azure portal, and some are only visible using a feature flag.
IMPORTANT
These features are currently in PREVIEW. See the Supplemental Terms of Use for Microsoft Azure Previews for legal terms
that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
Feature flags
As new features are released to preview, some of them will be behind a feature flag. To enable the functionality
in your environment, you must enable the feature flag on your subscription. These features are applied at the
subscription level for all firewalls (VNet firewalls and SecureHub firewalls).
This article will be updated to reflect the features that are currently in preview with instructions to enable them.
When the features move to General Availability (GA), they'll be available to all customers without the need to
enable a feature flag.
Preview features
The following features are available in preview.
Network rule name logging (preview)
Currently, a network rule hit event shows the following attributes in the logs:
Source and destination IP/port
Action (allow, or deny)
With this new feature, the event logs for network rules also show the following attributes:
Policy name
Rule collection group
Rule collection
Rule name
To enable the Network Rule name Logging feature, the following commands need to be run in Azure
PowerShell. For the feature to immediately take effect, an operation needs to be run on the firewall. This can be a
rule change (least intrusive), a setting change, or a stop/start operation. Otherwise, the firewall/s is updated with
the feature within several days.
Run the following Azure PowerShell commands to configure Azure Firewall network rule name logging:
Connect-AzAccount
Select-AzSubscription -Subscription "subscription_id or subscription_name"
Register-AzProviderFeature -FeatureName AFWEnableNetworkRuleNameLogging -ProviderNamespace Microsoft.Network
Register-AzResourceProvider -ProviderNamespace Microsoft.Network
Run the following Azure PowerShell command to turn off this feature:
Unregister-AzProviderFeature -FeatureName AFWEnableNetworkRuleNameLogging -ProviderNamespace
Microsoft.Network
NOTE
Existing Workbooks and any Sentinel integration will be adjusted to support the new structured logs when Resource
Specific mode is selected.
Next steps
To learn more about Azure Firewall, see What is Azure Firewall?.
Azure Firewall IDPS signature rule categories
8/4/2022 • 11 minutes to read • Edit Online
Azure Firewall IDPS features over 50 categories that can be assigned to individual signatures. The following
table is a list of definitions for each category.
Categories
C AT EGO RY DESC RIP T IO N
Botcc (Bot Command and Control) This category is for signatures that are autogenerated from
several sources of known and confirmed active botnet and
other Command andControl (C2) hosts. This category is
updated daily. The category’s primary data source is
Shadowserver.org.
Botcc Port grouped This category is for signatures like those in the Botcc
category but grouped by destination port. Rules grouped by
port can offer higher fidelity than rules not grouped by port.
Coin mining This category is for signatures with rules that detect
malware, which does coin mining. These signatures can also
detect some legitimate (though often undesirable) coin
mining software.
C AT EGO RY DESC RIP T IO N
DNS (Domain Name Service) This category is for signatures with rules for attacks and
vulnerabilities regarding DNS. This category is also used for
rules related to abuse of DNS such as tunneling.
Mobile Malware This category is for signatures that indicate malware that is
associated with mobile and tablet-operating systems like
Google Android, Apple iOS, and others. Malware that is
detected and is associated with mobile operating systems
will generally be placed in this category rather than the
standard categories like Malware.
Shell code This category is for signatures for remote shell code
detection. Remote shell code is used when an attacker wants
to target a vulnerable process running on another machine
on a local network or intranet. If successfully executed, the
shell code can provide the attacker access to the target
machine across the network. Remote shell codes normally
use standard TCP/IP socket connections to allow the attacker
access to the shell on the target machine. Such shell code
can be categorized based on how this connection is set up: if
the shell code can establish this connection, it's called a
“reverse shell” or a "connect back" shell code because the
shell code connects back to the attacker’s machine.
C AT EGO RY DESC RIP T IO N
Web Client This category is for signatures for attacks and vulnerabilities
associated with web clients such as web browsers and also
client-side applications like CURL, WGET, and others.
C AT EGO RY DESC RIP T IO N
Web Server This category is for signatures to detect attacks against web
server infrastructure such as APACHE, TOMCAT, NGINX,
Microsoft Internet Information Services (IIS), and other web
server software.
Web Specific Apps This category is for signatures to detect attacks and
vulnerabilities in specific web applications.
Next steps
To learn more about Azure Firewall Premium features, see Azure Firewall Premium features.
Azure Firewall Premium in the Azure portal
8/4/2022 • 2 minutes to read • Edit Online
Azure Firewall Premium is a next generation firewall with capabilities that are required for highly sensitive and
regulated environments. It includes the following features:
TLS inspection - decrypts outbound traffic, processes the data, then encrypts the data and sends it to the
destination.
IDPS - A network intrusion detection and prevention system (IDPS) allows you to monitor network activities
for malicious activity, log information about this activity, report it, and optionally attempt to block it.
URL filtering - extends Azure Firewall’s FQDN filtering capability to consider an entire URL. For example,
www.contoso.com/a/c instead of www.contoso.com .
Web categories - administrators can allow or deny user access to website categories such as gambling
websites, social media websites, and others.
For more information, see Azure Firewall Premium features.
Rule configuration
When you configure application rules in a Premium policy, you can configure addition Premium features:
Next steps
To see the Azure Firewall Premium features in action, see Deploy and configure Azure Firewall Premium.
Azure Firewall Premium certificates
8/4/2022 • 7 minutes to read • Edit Online
To properly configure Azure Firewall Premium TLS inspection, you must provide a valid intermediate CA
certificate and deposit it in Azure Key vault.
IMPORTANT
For production, you should use your corporate PKI to create an Intermediate CA certificate. A corporate PKI leverages the
existing infrastructure and handles the Root CA distribution to all endpoint machines. For more information, see Deploy
and configure Enterprise CA certificates for Azure Firewall.
Also, both scripts use the openssl.cnf configuration file. To use the scripts, copy the contents of openssl.cnf ,
and cert.sh or cert.ps1 to your local computer.
The scripts generate the following files:
rootCA.crt/rootCA.key - Root CA public certificate and private key.
interCA.crt/interCA.key - Intermediate CA public certificate and private key
interCA.pfx - Intermediate CA pkcs12 package which will be used by firewall
IMPORTANT
rootCA.key should be stored in a secure offline ___location. The scripts generate a certificate with validity of 1024 days. The
scripts require openssl binaries installed in your local machine. For more information see https://www.openssl.org/
After the certificates are created, deploy them to the following locations:
rootCA.crt - Deploy on endpoint machines (Public certificate only).
interCA.pfx - Import as certificate on a Key Vault and assign to firewall policy.
openssl.cnf
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
string_mask = utf8only
default_md = sha512
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
stateOrProvinceName = State or Province Name
localityName = Locality Name
0.organizationName = Organization Name
organizationalUnitName = Organizational Unit Name
commonName = Common Name
emailAddress = Email Address
[ rootCA_ext ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical, CA:true
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
[ interCA_ext ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical, CA:true, pathlen:1
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
[ server_ext ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical, CA:false
keyUsage = critical, digitalSignature
extendedKeyUsage = serverAuth
# Create root CA
openssl req -x509 -new -nodes -newkey rsa:4096 -keyout rootCA.key -sha256 -days 1024 -out rootCA.crt -subj
"/C=US/ST=US/O=Self Signed/CN=Self Signed Root CA" -config openssl.cnf -extensions rootCA_ext
echo ""
echo "================"
echo "Successfully generated root and intermediate CA certificates"
echo " - rootCA.crt/rootCA.key - Root CA public certificate and private key"
echo " - interCA.crt/interCA.key - Intermediate CA public certificate and private key"
echo " - interCA.pfx - Intermediate CA pkcs12 package which could be uploaded to Key Vault"
echo "================"
PowerShell - cert.ps1
# Create root CA
openssl req -x509 -new -nodes -newkey rsa:4096 -keyout rootCA.key -sha256 -days 3650 -out rootCA.crt -subj
'/C=US/ST=US/O=Self Signed/CN=Self Signed Root CA' -config openssl.cnf -extensions rootCA_ext
Write-Host ""
Write-Host "================"
Write-Host "Successfully generated root and intermediate CA certificates"
Write-Host " - rootCA.crt/rootCA.key - Root CA public certificate and private key"
Write-Host " - interCA.crt/interCA.key - Intermediate CA public certificate and private key"
Write-Host " - interCA.pfx - Intermediate CA pkcs12 package which could be uploaded to Key Vault"
Write-Host "================"
Certificate auto-generation
For non-production deployments, you can use the Azure Firewall Premium Certification Auto-Generation
mechanism, which automatically creates the following three resources for you:
Managed Identity
Key Vault
Self-signed Root CA certificate
Just choose the new managed identity, and it ties the three resources together in your Premium policy and sets
up TLS inspection.
Troubleshooting
If your CA certificate is valid, but you can’t access FQDNs or URLs under TLS inspection, check the following
items:
Ensure the web server certificate is valid.
Ensure the Root CA certificate is installed on client operating system.
Ensure the browser or HTTPS client contains a valid root certificate. Firefox and some other browsers may
have special certification policies.
Ensure the URL destination type in your application rule covers the correct path and any other hyperlinks
embedded in the destination HTML page. You can use wildcards for easy coverage of the entire required
URL path.
Next steps
Learn more about Azure Firewall Premium features
Azure Firewall web categories
8/4/2022 • 7 minutes to read • Edit Online
Web categories lets administrators allow or deny user access to web site categories such as gambling websites,
social media websites, and others. The categories are organized based on severity under Liability, High-
Bandwidth, Business use, Productivity loss, General surfing, and Uncategorized.
Liability
C AT EGO RY DESC RIP T IO N
Alcohol + tobacco Sites that are contain, promote, or sell alcohol- or tobacco-
related products or services.
Child abuse images Sites that present or discuss children in abusive or sexual
acts.
Child inappropriate Sites that are unsuitable for children, which may contain R-
rated or tasteless content, profanity, or adult material.
Nudity Sites that contain full or partial nudity that are not
necessarily overtly sexual in intent.
Pornography/sexually explicit Sites that contain explicit sexual content. Includes adult
products such as sex toys, CD-ROMs, and videos, adult
services such as videoconferencing, escort services, and strip
clubs, erotic stories, and textual descriptions of sexual acts.
Weapons Sites that depict, sell, review, or describe guns and weapons,
including for sport.
High bandwidth
C AT EGO RY DESC RIP T IO N
Image sharing Sites that host digital photographs and images, online photo
albums, and digital photo exchanges.
Streaming media + downloads Sites that deliver streaming content, such as Internet radio,
Internet TV or MP3 and live or archived media download
sites. Includes fan sites, or official sites run by musicians,
bands, or record labels.
Business use
C AT EGO RY DESC RIP T IO N
Private IP addresses Sites that are private IP addresses as defined in RFC 1918,
that is, hosts that do not require access to hosts in other
enterprises (or require limited access) and whose IP address
may be ambiguous between enterprises but are well-defined
within a certain enterprise.
Search engines + portals Sites enabling the searching of the Web, newsgroups,
images, directories, and other online content. Includes portal
and directory sites such as white/yellow pages.
Web-based email Sites that enable users to send and receive email through a
web accessible email account.
Productivity loss
C AT EGO RY DESC RIP T IO N
Social networking Sites that enable social networking for online communities of
various topics, for friendship, or/and dating.
General surfing
C AT EGO RY DESC RIP T IO N
General Sites that do not clearly fall into other categories, for
example, blank web pages.
Greeting cards Sites that allow people to send and receive greeting cards
and postcards.
Restaurants + dining Sites that list, review, promote or advertise food, dining or
catering services. Includes sites for recipes sites, cooking
instruction and tips, food products, and wine advisors.
C AT EGO RY DESC RIP T IO N
Sports Sites relating to sports teams, fan clubs, scores, and sports
news. Relates to all sports, whether professional or
recreational.
Uncategorized Sites that have not been categorized, such as new websites,
personal sites, and so on.
Next steps
Quickstart: Create an Azure Firewall and a firewall policy - ARM template
Quickstart: Deploy Azure Firewall with Availability Zones - ARM template
Tutorial: Deploy and configure Azure Firewall using the Azure portal
FQDN tags overview
8/4/2022 • 2 minutes to read • Edit Online
An FQDN tag represents a group of fully qualified ___domain names (FQDNs) associated with well known
Microsoft services. You can use an FQDN tag in application rules to allow the required outbound network traffic
through your firewall.
For example, to manually allow Windows Update network traffic through your firewall, you need to create
multiple application rules per the Microsoft documentation. Using FQDN tags, you can create an application
rule, include the Windows Updates tag, and now network traffic to Microsoft Windows Update endpoints can
flow through your firewall.
You can't create your own FQDN tags, nor can you specify which FQDNs are included within a tag. Microsoft
manages the FQDNs encompassed by the FQDN tag, and updates the tag as FQDNs change.
The following table shows the current FQDN tags you can use. Microsoft maintains these tags and you can
expect additional tags to be added periodically.
AppServiceEnvironment (ASE) Allows outbound access to ASE platform traffic. This tag
doesn’t cover customer-specific Storage and SQL endpoints
created by ASE. These should be enabled via Service
Endpoints or added manually.
AzureKubernetesService (AKS) Allows outbound access to AKS. For more information, see
Use Azure Firewall to protect Azure Kubernetes Service (AKS)
Deployments.
NOTE
When selecting FQDN Tag in an application rule, the protocol:port field must be set to https .
Next steps
To learn how to deploy an Azure Firewall, see Tutorial: Deploy and configure Azure Firewall using the Azure
portal.
Infrastructure FQDNs
8/4/2022 • 2 minutes to read • Edit Online
Azure Firewall includes a built-in rule collection for infrastructure FQDNs that are allowed by default. These
FQDNs are specific for the platform and can't be used for other purposes.
The following services are included in the built-in rule collection:
Compute access to storage Platform Image Repository (PIR)
Managed disks status storage access
Azure Diagnostics and Logging (MDS)
Overriding
You can override this built-in infrastructure rule collection by creating a deny all application rule collection that is
processed last. It will always be processed before the infrastructure rule collection. Anything not in the
infrastructure rule collection is denied by default.
Next steps
Learn how to deploy and configure an Azure Firewall.
Azure Firewall logs and metrics
8/4/2022 • 5 minutes to read • Edit Online
You can monitor Azure Firewall using firewall logs. You can also use activity logs to audit operations on Azure
Firewall resources.
You can access some of these logs through the portal. Logs can be sent to Azure Monitor logs, Storage, and
Event Hubs and analyzed in Azure Monitor logs or by different tools such as Excel and Power BI.
Metrics are lightweight and can support near real-time scenarios making them useful for alerting and fast issue
detection.
Diagnostic logs
The following diagnostic logs are available for Azure Firewall:
Application rule log
The Application rule log is saved to a storage account, streamed to Event hubs and/or sent to Azure
Monitor logs only if you've enabled it for each Azure Firewall. Each new connection that matches one of
your configured application rules results in a log for the accepted/denied connection. The data is logged
in JSON format, as shown in the following examples:
{
"category": "AzureFirewallApplicationRule",
"time": "2018-04-16T23:45:04.8295030Z",
"resourceId":
"/SUBSCRIPTIONS/{subscriptionId}/RESOURCEGROUPS/{resourceGroupName}/PROVIDERS/MICROSOFT.NETWORK/AZURE
FIREWALLS/{resourceName}",
"operationName": "AzureFirewallApplicationRuleLog",
"properties": {
"msg": "HTTPS request from 10.1.0.5:55640 to mydestination.com:443. Action: Allow. Rule
Collection: collection1000. Rule: rule1002"
}
}
{
"category": "AzureFirewallApplicationRule",
"time": "2018-04-16T23:45:04.8295030Z",
"resourceId":
"/SUBSCRIPTIONS/{subscriptionId}/RESOURCEGROUPS/{resourceGroupName}/PROVIDERS/MICROSOFT.NETWORK/AZURE
FIREWALLS/{resourceName}",
"operationName": "AzureFirewallApplicationRuleLog",
"properties": {
"msg": "HTTPS request from 10.11.2.4:53344 to www.bing.com:443. Action: Allow. Rule
Collection: ExampleRuleCollection. Rule: ExampleRule. Web Category: SearchEnginesAndPortals"
}
}
Network rule log
The Network rule log is saved to a storage account, streamed to Event hubs and/or sent to Azure Monitor
logs only if you've enabled it for each Azure Firewall. Each new connection that matches one of your
configured network rules results in a log for the accepted/denied connection. The data is logged in JSON
format, as shown in the following example:
{
"category": "AzureFirewallNetworkRule",
"time": "2018-06-14T23:44:11.0590400Z",
"resourceId":
"/SUBSCRIPTIONS/{subscriptionId}/RESOURCEGROUPS/{resourceGroupName}/PROVIDERS/MICROSOFT.NETWORK/AZURE
FIREWALLS/{resourceName}",
"operationName": "AzureFirewallNetworkRuleLog",
"properties": {
"msg": "TCP request from 111.35.136.173:12518 to 13.78.143.217:2323. Action: Deny"
}
}
Success:
{
"category": "AzureFirewallDnsProxy",
"time": "2020-09-02T19:12:33.751Z",
"resourceId":
"/SUBSCRIPTIONS/{subscriptionId}/RESOURCEGROUPS/{resourceGroupName}/PROVIDERS/MICROSOFT.NETWORK/AZURE
FIREWALLS/{resourceName}",
"operationName": "AzureFirewallDnsProxyLog",
"properties": {
"msg": "DNS Request: 11.5.0.7:48197 – 15676 AAA IN md-l1l1pg5lcmkq.blob.core.windows.net. udp
55 false 512 NOERROR - 0 2.000301956s"
}
}
Failed:
{
"category": "AzureFirewallDnsProxy",
"time": "2020-09-02T19:12:33.751Z",
"resourceId":
"/SUBSCRIPTIONS/{subscriptionId}/RESOURCEGROUPS/{resourceGroupName}/PROVIDERS/MICROSOFT.NETWORK/AZURE
FIREWALLS/{resourceName}",
"operationName": "AzureFirewallDnsProxyLog",
"properties": {
"msg": " Error: 2 time.windows.com.reddog.microsoft.com. A: read udp 10.0.1.5:49126-
>168.63.129.160:53: i/o timeout”
}
}
msg format:
[client’s IP address]:[client’s port] – [query ID] [type of the request] [class of the request] [name
of the request] [protocol used] [request size in bytes] [EDNS0 DO (DNSSEC OK) bit set in the query]
[EDNS0 buffer size advertised in the query] [response CODE] [response flags] [response size] [response
duration]
Activity logs
Activity log entries are collected by default, and you can view them in the Azure portal.
You can use Azure activity logs (formerly known as operational logs and audit logs) to view all operations
submitted to your Azure subscription.
Metrics
Metrics in Azure Monitor are numerical values that describe some aspect of a system at a particular time.
Metrics are collected every minute, and are useful for alerting because they can be sampled frequently. An alert
can be fired quickly with relatively simple logic.
The following metrics are available for Azure Firewall:
Application rules hit count - The number of times an application rule has been hit.
Unit: count
Network rules hit count - The number of times a network rule has been hit.
Unit: count
Data processed - Sum of data traversing the firewall in a given time window.
Unit: bytes
Throughput - Rate of data traversing the firewall per second.
Unit: bits per second
Firewall health state - Indicates the health of the firewall based on SNAT port availability.
Unit: percent
This metric has two dimensions:
Status: Possible values are Healthy, Degraded, Unhealthy.
Reason: Indicates the reason for the corresponding status of the firewall.
If SNAT ports are used > 95%, they are considered exhausted and the health is 50% with
status=Degraded and reason=SNAT por t . The firewall keeps processing traffic and existing
connections are not affected. However, new connections may not be established intermittently.
If SNAT ports are used < 95%, then firewall is considered healthy and health is shown as 100%.
If no SNAT ports usage is reported, health is shown as 0%.
SNAT por t utilization - The percentage of SNAT ports that have been utilized by the firewall.
Unit: percent
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.
If your firewall is running into SNAT port exhaustion, you should add at least five public IP address. This
increases the number of SNAT ports available. For more information, see Azure Firewall features.
Next steps
To learn how to monitor Azure Firewall logs and metrics, see Tutorial: Monitor Azure Firewall logs.
To learn more about metrics in Azure Monitor, see Metrics in Azure Monitor.
Azure Firewall threat intelligence-based filtering
8/4/2022 • 2 minutes to read • Edit Online
Threat intelligence-based filtering can be enabled for your firewall to alert and deny traffic from/to known
malicious IP addresses, FQDNs, and URLs. The IP addresses, domains and URLs are sourced from the Microsoft
Threat Intelligence feed, which includes multiple sources including the Microsoft Cyber Security team. Intelligent
Security Graph powers Microsoft threat intelligence and is used by multiple services including Microsoft
Defender for Cloud.
If you've enabled threat intelligence-based filtering, the associated rules are processed before any of the NAT
rules, network rules, or application rules.
You can choose to just log an alert when a rule is triggered, or you can choose alert and deny mode.
By default, threat intelligence-based filtering is enabled in alert mode. You can’t turn off this feature or change
the mode until the portal interface becomes available in your region.
Logs
The following log excerpt shows a triggered rule:
{
"category": "AzureFirewallNetworkRule",
"time": "2018-04-16T23:45:04.8295030Z",
"resourceId":
"/SUBSCRIPTIONS/{subscriptionId}/RESOURCEGROUPS/{resourceGroupName}/PROVIDERS/MICROSOFT.NETWORK/AZUREFIREWAL
LS/{resourceName}",
"operationName": "AzureFirewallThreatIntelLog",
"properties": {
"msg": "HTTP request from 10.0.0.5:54074 to somemaliciousdomain.com:80. Action: Alert. ThreatIntel:
Bot Networks"
}
}
Testing
Outbound testing - Outbound traffic alerts should be a rare occurrence, as it means that your
environment has been compromised. To help test outbound alerts are working, a test FQDN has been
created that triggers an alert. Use testmaliciousdomain.eastus.cloudapp.azure.com for your outbound
tests.
Inbound testing - You can expect to see alerts on incoming traffic if DNAT rules are configured on the
firewall. This is true even if only specific sources are allowed on the DNAT rule and traffic is otherwise
denied. Azure Firewall doesn't alert on all known port scanners; only on scanners that are known to also
engage in malicious activity.
Next steps
See Azure Firewall Log Analytics samples
Learn how to deploy and configure an Azure Firewall
Review the Microsoft Security intelligence report
Azure Firewall Policy rule sets
8/4/2022 • 3 minutes to read • Edit Online
Firewall Policy is a top-level resource that contains security and operational settings for Azure Firewall. You can
use Firewall Policy to manage rule sets that the Azure Firewall uses to filter traffic. Firewall policy organizes,
prioritizes, and processes the rule sets based on a hierarchy with the following components: rule collection
groups, rule collections, and rules.
Even though you can't delete the default rule collection groups nor modify their priority values, you can
manipulate their processing order in a different way. If you need to define a priority order that is different than
the default design, you can create custom rule collection groups with your wanted priority values. In this
scenario, you don't use the default rule collection groups at all and use only the ones you create to customize
the processing logic.
Rule collection groups contain one or multiple rule collections, which can be of type DNAT, network, or
application. For example, you can group rules belonging to the same workloads or a VNet in a rule collection
group.
Rule collection groups have a maximum size of 2 MB. If you need more than 2 MB, you can split the rules into
multiple rule collection groups. A Firewall Policy can contain 50 rule collection groups.
Rule collections
A rule collection belongs to a rule collection group, and it contains one or multiple rules. They're the second unit
processed by the firewall and they follow a priority order based on values. Rule collections must have a defined
action (allow or deny) and a priority value. The defined action applies to all the rules within the rule collection.
The priority value determines order the rule collections are processed.
There are three types of rule collections:
DNAT
Network
Application
Rule collection types must match their parent rule collection group category. For example, a DNAT rule
collection can only be part of a DNAT rule collection group.
Rules
A rule belongs to a rule collection, and it specifies which traffic is allowed or denied in your network. They're the
third unit to be processed by the firewall and they don't follow a priority order based on values. The processing
logic for rules follows a top-down approach. All traffic that passes through the firewall is evaluated by the
defined rules for an allow or deny match. If there's no rule that allows the traffic, then the traffic is denied by
default.
For application rules, the traffic is processed by our built-in infrastructure rule collection before it's denied by
default.
There are three types of rules:
DNAT
Network
Application
DNAT rules
DNAT rules allow or deny inbound traffic through the firewall public IP address(es). You can use a DNAT rule
when you want a public IP address to be translated into a private IP address. The Azure Firewall public IP
addresses can be used to listen to inbound traffic from the Internet, filter the traffic and translate this traffic to
internal resources in Azure.
Network rules
Network rules allow or deny inbound, outbound, and east-west traffic based on the network layer (L3) and
transport layer (L4).
You can use a network rule when you want to filter traffic based on IP addresses, any ports, and any protocols.
Application rules
Application rules allow or deny inbound, outbound, and east-west traffic based on the application layer (L7). You
can use an application rule when you want to filter traffic based on fully qualified ___domain names (FQDNs) and
HTTP/HTTPS protocols.
Next steps
Learn more about Azure Firewall rule processing: Configure Azure Firewall rules.
Configure Azure Firewall rules
8/4/2022 • 7 minutes to read • Edit Online
You can configure NAT rules, network rules, and applications rules on Azure Firewall using either classic rules or
Firewall Policy. Azure Firewall denies all traffic by default, until rules are manually configured to allow traffic.
NOTE
Application rules are always processed after Network rules, which are processed after DNAT rules regardless of Rule
collection group or Rule collection priority and policy inheritance.
The rule processing will be in the following order: DNATRC1, DNATRC3, ChDNATRC3, NetworkRC1,
NetworkRC2, ChNetRC1, ChNetRC2, AppRC2, ChAppRC1, ChAppRC2.
For more information about Firewall Policy rule sets, see Azure Firewall Policy rule sets.
Threat Intelligence
If you enable threat intelligence-based filtering, those rules are highest priority and are always processed first
(before network and application rules). Threat-intelligence filtering may deny traffic before any configured rules
are processed. For more information, see Azure Firewall threat intelligence-based filtering.
IDPS
When IDPS is configured in Alert mode, the IDPS engine works in parallel to the rule processing logicand
generates alerts on matching signatures for both inbound and outbound flows.For an IDPS signature match, an
alert is logged in firewall logs. However, since the IDPS engine works in parallel to the rule processing
engine,traffic that is denied/allowed by application/network rules may still generate another log entry.
When IDPS is configured in Alertand Denymode, the IDPS engine isinlineand activated after the rules processing
engine. So bothengines generate alertsand may blockmatching flows.
Session drops done by IDPS blocks the flow silently. So no RST is sent on the TCP level.Since IDPS inspects traffic
always after the Network/Application rule has been matched (Allow/Deny) and marked in logs, another Drop
message may be logged where IDPS decides to deny the session because of a signature match.
When TLS inspection is enabled both unencrypted and encrypted traffic is inspected.
Outbound connectivity
Network rules and applications rules
If you configure network rules and application rules, then network rules are applied in priority order before
application rules. The rules are terminating. So, if a match is found in a network rule, no other rules are
processed. If configured, IDPS is done on all traversed traffic and upon signature match, IDPS may alert or/and
block suspicious traffic.
If there's no network rule match, and if the protocol is HTTP, HTTPS, or MSSQL, the packet is then evaluated by
the application rules in priority order.
For HTTP, Azure Firewall looks for an application rule match according to the Host header. For HTTPS, Azure
Firewall looks for an application rule match according to SNI only.
In both HTTP and TLS inspected HTTPS cases, the firewall ignores the packet's destination IP address and uses
the DNS resolved IP address from the Host header. The firewall expects to get port number in the Host header,
otherwise it assumes the standard port 80. Ifthere's a port mismatch between the actual TCP port and the port
in the host header, the traffic is dropped.DNS resolution is done by Azure DNS or by a custom DNS if configured
on the firewall.
NOTE
Both HTTPand HTTPS protocols (with TLS inspection) are always filled by Azure Firewall with XFF (X-Forwarded-For)
header equal to the original source IP address.
When an application rule contains TLS inspection, the firewall rules engine process SNI, Host Header, and also
the URL to match the rule.
If still no match is found within application rules, then the packet is evaluated against theinfrastructure rule
collection. If there's still no match, then the packet is denied by default.
NOTE
Network rules can be configured forTCP,UDP,ICMP, orAnyIP protocol. Any IP protocol includes all the IP protocols as
defined in theInternet Assigned Numbers Authority (IANA) Protocol Numbersdocument. If a destination port is explicitly
configured, then the rule is translated to a TCP+UDP rule. Before November 9, 2020,AnymeantTCP, orUDP, orICMP. So,
you might have configured a rule before that date with Protocol = Any , and destination por ts = '*' . If you don't
intend to allow any IP protocol as currently defined, then modify the rule to explicitly configure the protocol(s) you want
(TCP, UDP, or ICMP).
Inbound connectivity
DNAT rules and Network rules
Inbound Internet connectivity can be enabled by configuring Destination Network Address Translation (DNAT) as
described in Tutorial: Filter inbound traffic with Azure Firewall DNAT using the Azure portal. NAT rules are
applied in priority before network rules. If a match is found, an implicit corresponding network rule to allow the
translated traffic is added. For security reasons, the recommended approach is to add a specific internet source
to allow DNAT access to the network and avoid using wildcards.
Application rules aren't applied for inbound connections. So if you want to filter inbound HTTP/S traffic, you
should use Web Application Firewall (WAF). For more information, see What is Azure Web Application Firewall?
Examples
The following examples show the results of some of these rule combinations.
Example 1
Connection to google.com is allowed because of a matching network rule.
Network rule
Action: Allow
Application rule
Action: Deny
Result
The connection to google.com is allowed because the packet matches the Allow-web network rule. Rule
processing stops at this point.
Example 2
SSH traffic is denied because a higher priority Deny network rule collection blocks it.
Network rule collection 1
Name: Allow-collection
Priority: 200
Action: Allow
Result
SSH connections are denied because a higher priority network rule collection blocks it. Rule processing stops at
this point.
Rule changes
If you change a rule to deny previously allowed traffic, any relevant existing sessions are dropped.
Three-way handshake behavior
As a stateful service, Azure Firewall completes a TCP three-way handshake for allowed traffic, from a source to
the destination.For example, VNet-A to VNet-B.
Creating an allow rule from VNet-A to VNet-B doesn't mean thatnew initiated connectionsfrom VNet-B to VNet-
Aare allowed.
As a result, there's no need to create an explicit deny rule from VNet-B to VNet-A. If you create this deny rule,
you'llinterrupt the three-way handshake from the initial allow rule from VNet-A to VNet-B.
Next steps
Learn how to deploy and configure an Azure Firewall.
Azure Firewall service tags
8/4/2022 • 2 minutes to read • Edit Online
A service tag represents a group of IP address prefixes to help minimize complexity for security rule creation.
You can’t create your own service tag, nor specify which IP addresses are included within a tag. Microsoft
manages the address prefixes encompassed by the service tag, and automatically updates the service tag as
addresses change.
Azure Firewall service tags can be used in the network rules destination field. You can use them in place of
specific IP addresses.
Configuration
Azure Firewall supports configuration of service tags via PowerShell, Azure CLI, or the Azure portal.
Configure via Azure PowerShell
In this example, we must first get context to our previously created Azure Firewall instance.
$FirewallName = "AzureFirewall"
$ResourceGroup = "AzureFirewall-RG"
$azfirewall = Get-AzFirewall -Name $FirewallName -ResourceGroupName $ResourceGroup
Next, we must create a new rule. For the Destination, you can specify the text value of the service tag you wish to
leverage, as mentioned previously.
$rule = New-AzFirewallNetworkRule -Name "AllowSQL" -Description "Allow access to Azure Database as a Service
(SQL, MySQL, PostgreSQL, Datawarehouse)" -SourceAddress "10.0.0.0/16" -DestinationAddress Sql -
DestinationPort 1433 -Protocol TCP
$ruleCollection = New-AzFirewallNetworkRuleCollection -Name "Data Collection" -Priority 1000 -Rule $rule -
ActionType Allow
Next, we must update the variable containing our Azure Firewall definition with the new network rules we
created.
$azFirewall.NetworkRuleCollections.add($ruleCollection)
Last, we must commit the Network Rule changes to the running Azure Firewall instance.
Next steps
To learn more about Azure Firewall rules, see Azure Firewall rule processing logic.
IP Groups in Azure Firewall
8/4/2022 • 2 minutes to read • Edit Online
IP Groups allow you to group and manage IP addresses for Azure Firewall rules in the following ways:
As a source address in DNAT rules
As a source or destination address in network rules
As a source address in application rules
An IP Group can have a single IP address, multiple IP addresses, or one or more IP address ranges.
IP Groups can be reused in Azure Firewall DNAT, network, and application rules for multiple firewalls across
regions and subscriptions in Azure. Group names must be unique. You can configure an IP Group in the Azure
portal, Azure CLI, or REST API. A sample template is provided to help you get started.
NOTE
IP Groups are not currently available in Azure national cloud environments.
Sample format
The following IPv4 address format examples are valid to use in IP Groups:
Single address: 10.0.0.0
CIDR notation: 10.1.0.0/32
Address range: 10.2.0.0-10.2.0.31
Create an IP Group
An IP Group can be created using the Azure portal, Azure CLI, or REST API. For more information, see Create an
IP Group.
Browse IP Groups
1. In the Azure portal search bar, type IP Groups and select it. You can see the list of the IP Groups, or you
can select Add to create a new IP Group.
2. Select an IP Group to open the overview page. You can edit, add, or delete IP addresses or IP Groups.
Manage an IP Group
You can see all the IP addresses in the IP Group and the rules or resources that are associated with it. To delete
an IP Group, you must first dissociate the IP Group from the resource that is using it.
1. To view or edit the IP addresses, select IP Addresses under Settings on the left pane.
2. To add a single or multiple IP address(es), select Add IP Addresses . This opens the Drag or Browse page
for an upload, or you can enter the address manually.
3. Selecting the ellipses (… ) to the right to edit or delete IP addresses. To edit or delete multiple IP addresses,
select the boxes and select Edit or Delete at the top.
4. Finally, can export the file in the CSV file format.
NOTE
If you delete all the IP addresses in an IP Group while it is still in use in a rule, that rule is skipped.
Use an IP Group
You can now select IP Group as a Source type or Destination type for the IP address(es) when you create
Azure Firewall DNAT, application, or network rules.
Region availability
IP Groups are available in all public cloud regions.
IP address limits
You can have a maximum of 100 IP Groups per firewall with a maximum 5000 individual IP addresses or IP
prefixes per each IP Group.
Next steps
Learn how to deploy and configure an Azure Firewall.
Azure Firewall forced tunneling
8/4/2022 • 3 minutes to read • Edit Online
When you configure a new Azure Firewall, you can route all Internet-bound traffic to a designated next hop
instead of going directly to the Internet. For example, you may have a default route advertised via BGP or using
User Defined Route (UDR) to force traffic to an on-premises edge firewall or other network virtual appliance
(NVA) to process network traffic before it's passed to the Internet. To support this configuration, you must create
Azure Firewall with Forced Tunnel configuration enabled. This is a mandatory requirement to avoid service
disruption. If this is a pre-existing firewall, you must recreate the firewall in Forced Tunnel mode to support this
configuration. For more information, see the Azure Firewall FAQ about stopping and restarting a firewall in
Forced Tunnel mode.
Azure Firewall provides automatic SNAT for all outbound traffic to public IP addresses. Azure Firewall doesn’t
SNAT when the destination IP address is a private IP address range per IANA RFC 1918. This logic works
perfectly when you egress directly to the Internet. However, with forced tunneling enabled, Internet-bound traffic
is SNATed to one of the firewall private IP addresses in the AzureFirewallSubnet. This hides the source address
from your on-premises firewall. You can configure Azure Firewall to not SNAT regardless of the destination IP
address by adding 0.0.0.0/0 as your private IP address range. With this configuration, Azure Firewall can never
egress directly to the Internet. For more information, see Azure Firewall SNAT private IP address ranges.
IMPORTANT
If you deploy a Secured Virtual Hub in forced tunnel mode, advertising the default route over Express Route or VPN
Gateway is not currently supported. A fix is being investigated.
If you enable forced tunneling, Internet-bound traffic is SNATed to one of the firewall private IP addresses in
AzureFirewallSubnet, hiding the source from your on-premises firewall.
If your organization uses a public IP address range for private networks, Azure Firewall SNATs the traffic to one
of the firewall private IP addresses in AzureFirewallSubnet. However, you can configure Azure Firewall to not
SNAT your public IP address range. For more information, see Azure Firewall SNAT private IP address ranges.
Once you configure Azure Firewall to support forced tunneling, you can't undo the configuration. If you remove
all other IP configurations on your firewall, the management IP configuration is removed as well and the firewall
is deallocated. The public IP address assigned to the management IP configuration can't be removed, but you
can assign a different public IP address.
Next steps
Tutorial: Deploy and configure Azure Firewall in a hybrid network using the Azure portal
Azure Firewall certifications
8/4/2022 • 2 minutes to read • Edit Online
Azure Firewall is Payment Card Industry (PCI), Service Organization Controls (SOC), International Organization
for Standardization (ISO), ICSA Labs, and HITRUST compliant.
The following certifications are for global Azure and Azure Government.
ICSA Labs is a leading vendor in third-party testing and certification of security and health IT products, as well as
network-connected devices. They measure product compliance, reliability, and performance for most of the
world’s top technology vendors.
Azure Firewall is the first cloud firewall service to attain the ICSA Labs Corporate Firewall Certification.
For the Azure Firewall certification report, see the ICSA Labs Certification Testing and Audit Report.
For the Intrusion Prevention Systems (IPS) report, see Network Intrusion Prevention Systems Certification
Testing Report.
For more information, see the ICSA Labs Firewall Certification Program page.
Next steps
For more information about Microsoft compliance, see the following information.
Microsoft Compliance Guide
Overview of Microsoft Azure compliance
Azure Firewall central management
8/4/2022 • 2 minutes to read • Edit Online
If you manage multiple firewalls, you know that continuously changing firewall rules make it difficult to keep
them in sync. Central IT teams need a way to define base firewall policies and enforce them across multiple
business units. At the same time, DevOps teams want to create their own local derived firewall policies for better
agility.
Azure Firewall Manager can help solve these problems.
Next steps
For more information about Azure Firewall Manager, see What is Azure Firewall Manager?
Azure Firewall remote work support
8/4/2022 • 2 minutes to read • Edit Online
Azure Firewall is a managed, cloud-based network security service that protects your Azure virtual network
resources. It's a fully stateful firewall as a service with built-in high availability and unrestricted cloud scalability.
Next steps
Learn more about Azure Virtual Desktop.
Use FQDN filtering in network rules
8/4/2022 • 2 minutes to read • Edit Online
A fully qualified ___domain name (FQDN) represents a ___domain name of a host or IP address(es). You can use
FQDNs in network rules based on DNS resolution in Azure Firewall and Firewall policy. This capability allows
you to filter outbound traffic with any TCP/UDP protocol (including NTP, SSH, RDP, and more). You must enable
DNS Proxy to use FQDNs in your network rules. For more information see Azure Firewall DNS settings.
NOTE
By design, FQDN filtering in network rules doesn’t support wildcards
How it works
Once you define which DNS server your organization needs (Azure DNS or your own custom DNS), Azure
Firewall translates the FQDN to an IP address(es) based on the selected DNS server. This translation happens for
both application and network rule processing.
When a new DNS resolution takes place, new IP addresses are added to firewall rules. Old IP addresses that are
no longer returned by the DNS server expire in 15 minutes. Azure Firewall rules are updated every 15 seconds
from DNS resolution of the FQDNs in network rules.
Differences in application rules vs. network rules
FQDN filtering in application rules for HTTP/S and MSSQL is based on an application level transparent
proxy and the SNI header. As such, it can discern between two FQDNs that are resolved to the same IP
address. This is not the case with FQDN filtering in network rules.
Always use application rules when possible:
If the protocol is HTTP/S or MSSQL, use application rules for FQDN filtering.
For services like AzureBackup, HDInsight, etc., use application rules with FQDN tags.
For any other protocols, you can use network rules for FQDN filtering.
Next steps
Azure Firewall DNS settings
Azure Firewall DNS Proxy details
8/4/2022 • 2 minutes to read • Edit Online
You can configure Azure Firewall to act as a DNS proxy. A DNS proxy is an intermediary for DNS requests from
client virtual machines to a DNS server.
The following information describes some implementation details for Azure Firewall DNS Proxy.
Next steps
Azure Firewall DNS settings
Azure Firewall FTP support
8/4/2022 • 2 minutes to read • Edit Online
Supported scenarios
The following table shows the configuration required to support various FTP scenarios:
* Active FTP will not work when the FTP client must reach an FTP server on the Internet. Active FTP uses a PORT
command from the FTP client that tells the FTP server what IP address and port to use for the data channel. This
PORT command uses the private IP address of the client which cannot be changed. Client-side traffic traversing
the Azure Firewall will be NATed for Internet-based communications, so the PORT command is seen as invalid by
the FTP server. This is a general limitation of Active FTP when used with a client-side NAT.
"additionalProperties": {
"Network.FTP.AllowActiveFTP": "True"
},
Next steps
To learn how to deploy an Azure Firewall, see Deploy and configure Azure Firewall using Azure PowerShell.
Azure Firewall performance
8/4/2022 • 2 minutes to read • Edit Online
Reliable firewall performance is essential to operate and protect your virtual networks in Azure. More advanced
features (like those found in Azure Firewall Premium) require more processing complexity. This will affect
firewall performance and impact the overall network performance.
Azure Firewall has two versions: Standard and Premium.
Azure Firewall Standard
Azure Firewall Standard has been generally available since September 2018. It is cloud native, highly
available, with built-in auto scaling firewall-as-a-service. You can centrally govern and log all your traffic
flows using a DevOps approach. The service supports both application and network level-filtering rules,
and is integrated with the Microsoft Threat Intelligence feed for filtering known malicious IP addresses
and domains.
Azure Firewall Premium
Azure Firewall Premium is a next generation firewall. It has capabilities that are required for highly
sensitive and regulated environments. The features that might affect the performance of the Firewall are
TLS (Transport Layer Security) inspection and IDPS (Intrusion Detection and Prevention).
For more information about Azure Firewall, see What is Azure Firewall?
Performance testing
Before you deploy Azure Firewall, the performance needs to be tested and evaluated to ensure it meets your
expectations. Not only should Azure Firewall handle the current traffic on a network, but it should also be ready
for potential traffic growth. It is recommended to evaluate on a test network and not in a production
environment. The testing should attempt to replicate the production environment as close as possible. This
includes the network topology, and emulating the actual characteristics of the expected traffic through the
firewall.
Performance data
The following set of performance results demonstrates the maximal Azure Firewall throughput in various use
cases. All use cases were measured while Threat intelligence mode was set to alert/deny. Azure Firewall
Premium performance boost feature is enabled on all Azure Firewall premium deployments by default. This
feature includes enabling Accelerated Networking on the underlying firewall virtual machines.
Standard 30 30
NOTE
IPS (Intrusion Prevention System) takes place when one or more signatures are configured to Alert and Deny mode.
Azure Firewall also supports the following throughput for single connections:
Standard 1.3
Max bandwidth for single TCP connection
Premium 9.5
Max bandwidth for single TCP connection
Premium single TCP connection with IDPS on Alert and Deny up to 300 Mbps
mode
Performance values are calculated with Azure Firewall at full scale. Actual performance may vary depending on
your rule complexity and network configuration. These metrics are updated periodically as performance
continuously evolves with each release.
Next steps
Learn how to deploy and configure an Azure Firewall.
Deploy and configure Azure Firewall using the
Azure portal
8/4/2022 • 9 minutes to read • Edit Online
Controlling outbound network access is an important part of an overall network security plan. For example, you
may want to limit access to web sites. Or, you may want to limit the outbound IP addresses and ports that can be
accessed.
One way you can control outbound network access from an Azure subnet is with Azure Firewall. With Azure
Firewall, you can configure:
Application rules that define fully qualified ___domain names (FQDNs) that can be accessed from a subnet.
Network rules that define source address, protocol, destination port, and destination address.
Network traffic is subjected to the configured firewall rules when you route your network traffic to the firewall
as the subnet default gateway.
For this article, you create a simplified single VNet with two subnets for easy deployment.
For production deployments, a hub and spoke model is recommended, where the firewall is in its own VNet. The
workload servers are in peered VNets in the same region with one or more subnets.
AzureFirewallSubnet - the firewall is in this subnet.
Workload-SN - the workload server is in this subnet. This subnet's network traffic goes through the firewall.
If you prefer, you can complete this procedure using Azure PowerShell.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall FAQ.
1. On the Azure portal menu or from the Home page, select Create a resource .
2. Select Networking > Vir tual network .
3. For Subscription , select your subscription.
4. For Resource group , select Test-FW-RG .
5. For Name , type Test-FW-VN .
6. For Region , select the same ___location that you used previously.
7. Select Next: IP addresses .
8. For IPv4 Address space , accept the default 10.0.0.0/16 .
9. Under Subnet name , select default .
10. For Subnet name change it to AzureFirewallSubnet . The firewall will be in this subnet, and the subnet
name must be AzureFirewallSubnet.
11. For Address range , change it to 10.0.1.0/26 .
12. Select Save .
Next, create a subnet for the workload server.
13. Select Add subnet .
14. For Subnet name , type Workload-SN .
15. For Subnet address range , type 10.0.2.0/24 .
16. Select Add .
17. Select Review + create .
18. Select Create .
Create a virtual machine
Now create the workload virtual machine, and place it in the Workload-SN subnet.
1. On the Azure portal menu or from the Home page, select Create a resource .
2. Select Windows Ser ver 2019 Datacenter .
3. Enter these values for the virtual machine:
SET T IN G VA L UE
SET T IN G VA L UE
Name Test-FW01
Clean up resources
You can keep your firewall resources to continue testing, or if no longer needed, delete the Test-FW-RG
resource group to delete all firewall-related resources.
Next steps
Tutorial: Monitor Azure Firewall logs
Deploy and configure Azure Firewall in a hybrid
network using the Azure portal
8/4/2022 • 14 minutes to read • Edit Online
When you connect your on-premises network to an Azure virtual network to create a hybrid network, the ability
to control access to your Azure network resources is an important part of an overall security plan.
You can use Azure Firewall to control network access in a hybrid network using rules that define allowed and
denied network traffic.
For this article, you create three virtual networks:
VNet-Hub - the firewall is in this virtual network.
VNet-Spoke - the spoke virtual network represents the workload located on Azure.
VNet-Onprem - The on-premises virtual network represents an on-premises network. In an actual
deployment, it can be connected by either a VPN or ExpressRoute connection. For simplicity, this procedure
uses a VPN gateway connection, and an Azure-located virtual network is used to represent an on-premises
network.
Prerequisites
A hybrid network uses the hub-and-spoke architecture model to route traffic between Azure VNets and on-
premises networks. The hub-and-spoke architecture has the following requirements:
Set Use this vir tual network's gateway or Route Ser ver when peering VNet-Hub to VNet-Spoke. In
a hub-and-spoke network architecture, a gateway transit allows the spoke virtual networks to share the
VPN gateway in the hub, instead of deploying VPN gateways in every spoke virtual network.
Additionally, routes to the gateway-connected virtual networks or on-premises networks will
automatically propagate to the routing tables for the peered virtual networks using the gateway transit.
For more information, see Configure VPN gateway transit for virtual network peering.
Set Use the remote vir tual network's gateways or Route Ser ver when you peer VNet-Spoke to
VNet-Hub. If Use the remote vir tual network's gateways or Route Ser ver is set and Use this
vir tual network's gateway or Route Ser ver on remote peering is also set, the spoke virtual network
uses gateways of the remote virtual network for transit.
To route the spoke subnet traffic through the hub firewall, you can use a User Defined route (UDR) that
points to the firewall with the Vir tual network gateway route propagation option disabled. The
Vir tual network gateway route propagation disabled option prevents route distribution to the
spoke subnets. This prevents learned routes from conflicting with your UDR. If you want to keep Vir tual
network gateway route propagation enabled, make sure to define specific routes to the firewall to
override those that are published from on-premises over BGP.
Configure a UDR on the hub gateway subnet that points to the firewall IP address as the next hop to the
spoke networks. No UDR is required on the Azure Firewall subnet, as it learns routes from BGP.
See the Create Routes section in this article to see how these routes are created.
NOTE
Azure Firewall must have direct Internet connectivity. If your AzureFirewallSubnet learns a default route to your on-
premises network via BGP, you must override this with a 0.0.0.0/0 UDR with the NextHopType value set as Internet to
maintain direct Internet connectivity.
Azure Firewall can be configured to support forced tunneling. For more information, see Azure Firewall forced tunneling.
NOTE
Traffic between directly peered VNets is routed directly even if a UDR points to Azure Firewall as the default gateway. To
send subnet to subnet traffic to the firewall in this scenario, a UDR must contain the target subnet network prefix explicitly
on both subnets.
If you don't have an Azure subscription, create a free account before you begin.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall FAQ.
SET T IN G VA L UE
Name AzFW01
Region East US
SET T IN G N A M E VA L UE
SET T IN G N A M E VA L UE
6. Select Add .
Create the routes
Next, create a couple routes:
A route from the hub gateway subnet to the spoke subnet through the firewall IP address
A default route from the spoke subnet through the firewall IP address
1. From the Azure portal home page, select Create a resource .
2. In the search text box, type route table and press Enter .
3. Select Route table .
4. Select Create .
5. Select the FW-Hybrid-Test for the resource group.
6. For Region , select the same ___location that you used previously.
7. For the name, type UDR-Hub-Spoke .
8. Select Review + Create .
9. Select Create .
10. After the route table is created, select it to open the route table page.
11. Select Routes in the left column.
12. Select Add .
13. For the route name, type ToSpoke .
14. For the address prefix, type 10.6.0.0/16 .
15. For next hop type, select Vir tual appliance .
16. For next hop address, type the firewall's private IP address that you noted earlier.
17. Select OK .
Now associate the route to the subnet.
1. On the UDR-Hub-Spoke - Routes page, select Subnets .
2. Select Associate .
3. Under Vir tual network , select VNet-hub .
4. Under Subnet , select GatewaySubnet .
5. Select OK .
Now create the default route from the spoke subnet.
1. From the Azure portal home page, select Create a resource .
2. In the search text box, type route table and press Enter .
3. Select Route table .
4. Select Create .
5. Select the FW-Hybrid-Test for the resource group.
6. For Region , select the same ___location that you used previously.
7. For the name, type UDR-DG .
8. For Propagate gateway route , select No .
9. Select Review + Create .
10. Select Create .
11. After the route table is created, select it to open the route table page.
12. Select Routes in the left column.
13. Select Add .
14. For the route name, type ToHub .
15. For the address prefix, type 0.0.0.0/0 .
16. For next hop type, select Vir tual appliance .
17. For next hop address, type the firewall's private IP address that you noted earlier.
18. Select OK .
Now associate the route to the subnet.
1. On the UDR-DG - Routes page, select Subnets .
2. Select Associate .
3. Under Vir tual network , select VNet-spoke .
4. Under Subnet , select SN-Workload .
5. Select OK .
Set-AzVMExtension `
-ResourceGroupName FW-Hybrid-Test `
-ExtensionName IIS `
-VMName VM-Spoke-01 `
-Publisher Microsoft.Compute `
-ExtensionType CustomScriptExtension `
-TypeHandlerVersion 1.4 `
-SettingString '{"commandToExecute":"powershell Add-WindowsFeature Web-Server; powershell
Add-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\" -Value $($env:computername)"}' `
-Location EastUS
NOTE
Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the back-end
pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP
address that isn't configurable.
For more information, see Default outbound access in Azure.
The default outbound access IP is disabled when either a public IP address is assigned to the VM or the VM is placed in
the back-end pool of a standard load balancer, with or without outbound rules. If an Azure Virtual Network network
address translation (NAT) gateway resource is assigned to the subnet of the virtual machine, the default outbound access
IP is disabled.
VMs that are created by virtual machine scale sets in flexible orchestration mode don't have default outbound access.
For more information about outbound connections in Azure, see Use source network address translation (SNAT) for
outbound connections.
4. From the VM-Onprem virtual machine, open a remote desktop to VM-spoke-01 at the private IP
address.
Your connection should succeed, and you should be able to sign in.
So now you've verified that the firewall rules are working:
You can browse web server on the spoke virtual network.
You can connect to the server on the spoke virtual network using RDP.
Next, change the firewall network rule collection action to Deny to verify that the firewall rules work as
expected.
1. Select the AzFW01 firewall.
2. Select Rules .
3. Select the Network rule collection tab and select the RCNet01 rule collection.
4. For Action , select Deny .
5. Select Save .
Close any existing remote desktops before testing the changed rules. Now run the tests again. They should all
fail this time.
Clean up resources
You can keep your firewall resources for further testing, or if no longer needed, delete the FW-Hybrid-Test
resource group to delete all firewall-related resources.
Next steps
Next, you can monitor the Azure Firewall logs.
Tutorial: Monitor Azure Firewall logs
Filter inbound Internet traffic with Azure Firewall
DNAT using the Azure portal
8/4/2022 • 6 minutes to read • Edit Online
You can configure Azure Firewall Destination Network Address Translation (DNAT) to translate and filter inbound
Internet traffic to your subnets. When you configure DNAT, the NAT rule collection action is set to Dnat . Each
rule in the NAT rule collection can then be used to translate your firewall public IP address and port to a private
IP address and port. DNAT rules implicitly add a corresponding network rule to allow the translated traffic. For
security reasons, the recommended approach is to add a specific Internet source to allow DNAT access to the
network and avoid using wildcards. To learn more about Azure Firewall rule processing logic, see Azure Firewall
rule processing logic.
In this article, you learn how to:
Set up a test network environment
Deploy a firewall
Create a default route
Configure a DNAT rule
Test the firewall
NOTE
This article uses classic Firewall rules to manage the firewall. The preferred method is to use Firewall Policy. To complete
this procedure using Firewall Policy, see Tutorial: Filter inbound Internet traffic with Azure Firewall policy DNAT using the
Azure portal
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall
FAQ.
SET T IN G VA L UE
Name FW-DNAT-test
Clean up resources
You can keep your firewall resources for further testing, or if no longer needed, delete the RG-DNAT-Test
resource group to delete all firewall-related resources.
Next steps
Next, you can monitor the Azure Firewall logs.
Tutorial: Monitor Azure Firewall logs
Deploy and configure Azure Firewall using Azure
PowerShell
8/4/2022 • 6 minutes to read • Edit Online
Controlling outbound network access is an important part of an overall network security plan. For example, you
may want to limit access to web sites. Or, you may want to limit the outbound IP addresses and ports that can be
accessed.
One way you can control outbound network access from an Azure subnet is with Azure Firewall. With Azure
Firewall, you can configure:
Application rules that define fully qualified ___domain names (FQDNs) that can be accessed from a subnet.
Network rules that define source address, protocol, destination port, and destination address.
Network traffic is subjected to the configured firewall rules when you route your network traffic to the firewall
as the subnet default gateway.
For this article, you create a simplified single VNet with three subnets for easy deployment. For production
deployments, a hub and spoke model is recommended, where the firewall is in its own VNet. The workload
servers are in peered VNets in the same region with one or more subnets.
AzureFirewallSubnet - the firewall is in this subnet.
Workload-SN - the workload server is in this subnet. This subnet's network traffic goes through the firewall.
AzureBastionSubnet - the subnet used for Azure Bastion, which is used to connect to the workload server.
For more information about Azure Bastion, see What is Azure Bastion?
Prerequisites
This procedure requires that you run PowerShell locally. You must have the Azure PowerShell module installed.
Run Get-Module -ListAvailable Az to find the version. If you need to upgrade, see Install Azure PowerShell
module. After you verify the PowerShell version, run Connect-AzAccount to create a connection with Azure.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall FAQ.
NOTE
Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the back-end
pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP
address that isn't configurable.
For more information, see Default outbound access in Azure.
The default outbound access IP is disabled when either a public IP address is assigned to the VM or the VM is placed in
the back-end pool of a standard load balancer, with or without outbound rules. If an Azure Virtual Network network
address translation (NAT) gateway resource is assigned to the subnet of the virtual machine, the default outbound access
IP is disabled.
VMs that are created by virtual machine scale sets in flexible orchestration mode don't have default outbound access.
For more information about outbound connections in Azure, see Use source network address translation (SNAT) for
outbound connections.
$AzfwPrivateIP = $Azfw.IpConfigurations.privateipaddress
$AzfwPrivateIP
Note the private IP address. You'll use it later when you create the default route.
#Create a route
Add-AzRouteConfig `
-Name "DG-Route" `
-RouteTable $routeTableDG `
-AddressPrefix 0.0.0.0/0 `
-NextHopType "VirtualAppliance" `
-NextHopIpAddress $AzfwPrivateIP `
| Set-AzRouteTable
Set-AzVirtualNetworkSubnetConfig `
-VirtualNetwork $testVnet `
-Name Workload-SN `
-AddressPrefix 10.0.2.0/24 `
-RouteTable $routeTableDG | Set-AzVirtualNetwork
$Azfw.ApplicationRuleCollections.Add($AppRuleCollection)
Azure Firewall includes a built-in rule collection for infrastructure FQDNs that are allowed by default. These
FQDNs are specific for the platform and can't be used for other purposes. For more information, see
Infrastructure FQDNs.
$Azfw.NetworkRuleCollections.Add($NetRuleCollection)
Change the primary and secondary DNS address for the Srv-Work network interface
For testing purposes in this procedure, configure the server's primary and secondary DNS addresses. This isn't a
general Azure Firewall requirement.
$NIC01.DnsSettings.DnsServers.Add("209.244.0.3")
$NIC01.DnsSettings.DnsServers.Add("209.244.0.4")
$NIC01 | Set-AzNetworkInterface
nslookup www.google.com
nslookup www.microsoft.com
Both commands should return answers, showing that your DNS queries are getting through the firewall.
3. Run the following commands:
The www.google.com requests should succeed, and the www.microsoft.com requests should fail. This
demonstrates that your firewall rules are operating as expected.
So now you've verified that the firewall rules are working:
You can resolve DNS names using the configured external DNS server.
You can browse to the one allowed FQDN, but not to any others.
Clean up resources
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the Test-FW-RG
resource group to delete all firewall-related resources:
Next steps
Tutorial: Monitor Azure Firewall logs
Deploy and configure Azure Firewall policy using
Azure PowerShell
8/4/2022 • 5 minutes to read • Edit Online
Controlling outbound network access is an important part of an overall network security plan. For example, you
may want to limit access to web sites. Or, you may want to limit the outbound IP addresses and ports that can be
accessed.
One way you can control outbound network access from an Azure subnet is with Azure Firewall and Firewall
Policy. With Azure Firewall, you can configure:
Application rules that define fully qualified ___domain names (FQDNs) that can be accessed from a subnet.
Network rules that define source address, protocol, destination port, and destination address.
Network traffic is subjected to the configured firewall rules when you route your network traffic to the firewall
as the subnet default gateway.
For this article, you create a simplified single VNet with three subnets for easy deployment. For production
deployments, a hub and spoke model is recommended, where the firewall is in its own VNet. The workload
servers are in peered VNets in the same region with one or more subnets.
AzureFirewallSubnet - the firewall is in this subnet.
Workload-SN - the workload server is in this subnet. This subnet's network traffic goes through the firewall.
AzureBastionSubnet - the subnet used for Azure Bastion, which is used to connect to the workload server.
For more information about Azure Bastion, see What is Azure Bastion?
Prerequisites
This procedure requires that you run PowerShell locally. You must have the Azure PowerShell module installed.
Run Get-Module -ListAvailable Az to find the version. If you need to upgrade, see Install Azure PowerShell
module. After you verify the PowerShell version, run Connect-AzAccount to create a connection with Azure.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall FAQ.
Azure Firewall includes a built-in rule collection for infrastructure FQDNs that are allowed by default. These
FQDNs are specific for the platform and can't be used for other purposes. For more information, see
Infrastructure FQDNs.
$AzfwPrivateIP = $Azfw.IpConfigurations.privateipaddress
$AzfwPrivateIP
Note the private IP address. You'll use it later when you create the default route.
$routeTableDG = New-AzRouteTable `
-Name Firewall-rt-table `
-ResourceGroupName Test-FW-RG `
-___location "East US" `
-DisableBgpRoutePropagation
#Create a route
Add-AzRouteConfig `
-Name "DG-Route" `
-RouteTable $routeTableDG `
-AddressPrefix 0.0.0.0/0 `
-NextHopType "VirtualAppliance" `
-NextHopIpAddress $AzfwPrivateIP `
| Set-AzRouteTable
Set-AzVirtualNetworkSubnetConfig `
-VirtualNetwork $testVnet `
-Name Workload-SN `
-AddressPrefix 10.0.2.0/24 `
-RouteTable $routeTableDG | Set-AzVirtualNetwork
Change the primary and secondary DNS address for the Srv-Work
network interface
For testing purposes in this procedure, configure the server's primary and secondary DNS addresses. This isn't a
general Azure Firewall requirement.
$NIC01.DnsSettings.DnsServers.Add("209.244.0.3")
$NIC01.DnsSettings.DnsServers.Add("209.244.0.4")
$NIC01 | Set-AzNetworkInterface
nslookup www.google.com
nslookup www.microsoft.com
Both commands should return answers, showing that your DNS queries are getting through the firewall.
3. Run the following commands:
The www.google.com requests should succeed, and the www.microsoft.com requests should fail. This
demonstrates that your firewall rules are operating as expected.
So now you've verified that the firewall policy rules are working:
You can resolve DNS names using the configured external DNS server.
You can browse to the one allowed FQDN, but not to any others.
Clean up resources
You can keep your firewall resources for further testing, or if no longer needed, delete the Test-FW-RG resource
group to delete all firewall-related resources:
Next steps
Tutorial: Monitor Azure Firewall logs
Deploy and configure Azure Firewall in a hybrid
network using Azure PowerShell
8/4/2022 • 12 minutes to read • Edit Online
When you connect your on-premises network to an Azure virtual network to create a hybrid network, the ability
to control access to your Azure network resources is an important part of an overall security plan.
You can use Azure Firewall to control network access in a hybrid network using rules that define allowed and
denied network traffic.
For this article, you create three virtual networks:
VNet-Hub - the firewall is in this virtual network.
VNet-Spoke - the spoke virtual network represents the workload located on Azure.
VNet-Onprem - The on-premises virtual network represents an on-premises network. In an actual
deployment, it can be connected by either a VPN or ExpressRoute connection. For simplicity, this article uses
a VPN gateway connection, and an Azure-located virtual network is used to represent an on-premises
network.
Prerequisites
This article requires that you run PowerShell locally. You must have the Azure PowerShell module installed. Run
Get-Module -ListAvailable Az to find the version. If you need to upgrade, see Install Azure PowerShell module.
After you verify the PowerShell version, run Login-AzAccount to create a connection with Azure.
There are three key requirements for this scenario to work correctly:
A User Defined Route (UDR) on the spoke subnet that points to the Azure Firewall IP address as the
default gateway. Virtual network gateway route propagation must be Disabled on this route table.
A UDR on the hub gateway subnet must point to the firewall IP address as the next hop to the spoke
networks.
No UDR is required on the Azure Firewall subnet, as it learns routes from BGP.
Make sure to set AllowGatewayTransit when peering VNet-Hub to VNet-Spoke and
UseRemoteGateways when peering VNet-Spoke to VNet-Hub.
See the Create Routes section in this article to see how these routes are created.
NOTE
Azure Firewall must have direct Internet connectivity. If your AzureFirewallSubnet learns a default route to your on-
premises network via BGP, you must configure Azure Firewall in forced tunneling mode. If this is an existing Azure Firewall,
which cannot be reconfigured in forced tunneling mode, it is recommended to add a 0.0.0.0/0 UDR on the
AzureFirewallSubnet with the NextHopType value set as Internet to maintain direct Internet connectivity.
For more information, see Azure Firewall forced tunneling.
NOTE
Traffic between directly peered VNets is routed directly even if a UDR points to Azure Firewall as the default gateway. To
send subnet to subnet traffic to the firewall in this scenario, a UDR must contain the target subnet network prefix explicitly
on both subnets.
To review the related Azure PowerShell reference documentation, see Azure PowerShell Reference.
If you don't have an Azure subscription, create a free account before you begin.
$VNetnameHub = "VNet-hub"
$SNnameHub = "AzureFirewallSubnet"
$VNetHubPrefix = "10.5.0.0/16"
$SNHubPrefix = "10.5.0.0/24"
$SNGWHubPrefix = "10.5.1.0/24"
$GWHubName = "GW-hub"
$GWHubpipName = "VNet-hub-GW-pip"
$GWIPconfNameHub = "GW-ipconf-hub"
$ConnectionNameHub = "hub-to-Onprem"
$VnetNameSpoke = "VNet-Spoke"
$SNnameSpoke = "SN-Workload"
$VNetSpokePrefix = "10.6.0.0/16"
$SNSpokePrefix = "10.6.0.0/24"
$SNSpokeGWPrefix = "10.6.1.0/24"
$VNetnameOnprem = "Vnet-Onprem"
$SNNameOnprem = "SN-Corp"
$VNetOnpremPrefix = "192.168.0.0/16"
$SNOnpremPrefix = "192.168.1.0/24"
$SNGWOnpremPrefix = "192.168.2.0/24"
$GWOnpremName = "GW-Onprem"
$GWIPconfNameOnprem = "GW-ipconf-Onprem"
$ConnectionNameOnprem = "Onprem-to-hub"
$GWOnprempipName = "VNet-Onprem-GW-pip"
$SNnameGW = "GatewaySubnet"
Request a public IP address to be allocated to the VPN gateway you'll create for your virtual network. Notice that
the AllocationMethod is Dynamic . You can't specify the IP address that you want to use. It's dynamically
allocated to your VPN gateway.
$gwpip1 = New-AzPublicIpAddress -Name $GWHubpipName -ResourceGroupName $RG1 `
-Location $Location1 -AllocationMethod Dynamic
Request a public IP address to be allocated to the gateway you'll create for the virtual network. Notice that the
AllocationMethod is Dynamic . You can't specify the IP address that you want to use. It's dynamically allocated to
your gateway.
$AzfwPrivateIP = $Azfw.IpConfigurations.privateipaddress
$AzfwPrivateIP
Now create the VPN gateway for the hub virtual network. Network-to-network configurations require a
RouteBased VpnType. Creating a VPN gateway can often take 45 minutes or more, depending on the selected
VPN gateway SKU.
Now create the VPN gateway for the on-premises virtual network. Network-to-network configurations require a
RouteBased VpnType. Creating a VPN gateway can often take 45 minutes or more, depending on the selected
VPN gateway SKU.
Create the on-premises to hub virtual network connection. This step is similar to the previous one, except you
create the connection from VNet-Onprem to VNet-hub. Make sure the shared keys match. The connection will
be established after a few minutes.
After the cmdlet finishes, view the values. In the following example, the connection status shows as Connected
and you can see ingress and egress bytes.
"connectionStatus": "Connected",
"ingressBytesTransferred": 33509044,
"egressBytesTransferred": 4142431
#Create a route
Get-AzRouteTable `
-ResourceGroupName $RG1 `
-Name UDR-Hub-Spoke `
| Add-AzRouteConfig `
-Name "ToSpoke" `
-AddressPrefix $VNetSpokePrefix `
-NextHopType "VirtualAppliance" `
-NextHopIpAddress $AzfwPrivateIP `
| Set-AzRouteTable
Set-AzVirtualNetworkSubnetConfig `
-VirtualNetwork $VNetHub `
-Name $SNnameGW `
-AddressPrefix $SNGWHubPrefix `
-RouteTable $routeTableHubSpoke | `
Set-AzVirtualNetwork
#Create a table, with BGP route propagation disabled. The property is now called "Virtual network gateway
route propagation," but the API still refers to the parameter as "DisableBgpRoutePropagation."
$routeTableSpokeDG = New-AzRouteTable `
-Name 'UDR-DG' `
-ResourceGroupName $RG1 `
-___location $Location1 `
-DisableBgpRoutePropagation
#Create a route
Get-AzRouteTable `
-ResourceGroupName $RG1 `
-Name UDR-DG `
| Add-AzRouteConfig `
-Name "ToFirewall" `
-AddressPrefix 0.0.0.0/0 `
-NextHopType "VirtualAppliance" `
-NextHopIpAddress $AzfwPrivateIP `
| Set-AzRouteTable
Set-AzVirtualNetworkSubnetConfig `
-VirtualNetwork $VNetSpoke `
-Name $SNnameSpoke `
-AddressPrefix $SNSpokePrefix `
-RouteTable $routeTableSpokeDG | `
Set-AzVirtualNetwork
# Create an inbound network security group rule for ports 3389 and 80
$nsgRuleRDP = New-AzNetworkSecurityRuleConfig -Name Allow-RDP -Protocol Tcp `
-Direction Inbound -Priority 200 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix
$SNSpokePrefix -DestinationPortRange 3389 -Access Allow
$nsgRuleWeb = New-AzNetworkSecurityRuleConfig -Name Allow-web -Protocol Tcp `
-Direction Inbound -Priority 202 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix
$SNSpokePrefix -DestinationPortRange 80 -Access Allow
New-AzVm `
-ResourceGroupName $RG1 `
-Name "VM-Onprem" `
-Location $Location1 `
-VirtualNetworkName $VNetnameOnprem `
-SubnetName $SNNameOnprem `
-OpenPorts 3389 `
-Size "Standard_DS2"
NOTE
Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the back-end
pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP
address that isn't configurable.
For more information, see Default outbound access in Azure.
The default outbound access IP is disabled when either a public IP address is assigned to the VM or the VM is placed in
the back-end pool of a standard load balancer, with or without outbound rules. If an Azure Virtual Network network
address translation (NAT) gateway resource is assigned to the subnet of the virtual machine, the default outbound access
IP is disabled.
VMs that are created by virtual machine scale sets in flexible orchestration mode don't have default outbound access.
For more information about outbound connections in Azure, see Use source network address translation (SNAT) for
outbound connections.
$NIC.IpConfigurations.privateipaddress
$rcNet = $azfw.GetNetworkRuleCollectionByName("RCNet01")
$rcNet.action.type = "Deny"
Now run the tests again. They should all fail this time. Close any existing remote desktops before testing the
changed rules.
Clean up resources
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the FW-Hybrid-Test
resource group to delete all firewall-related resources.
Next steps
Next, you can monitor the Azure Firewall logs.
Tutorial: Monitor Azure Firewall logs
Deploy and configure Azure Firewall using Azure
CLI
8/4/2022 • 7 minutes to read • Edit Online
Controlling outbound network access is an important part of an overall network security plan. For example, you
may want to limit access to web sites. Or, you may want to limit the outbound IP addresses and ports that can be
accessed.
One way you can control outbound network access from an Azure subnet is with Azure Firewall. With Azure
Firewall, you can configure:
Application rules that define fully qualified ___domain names (FQDNs) that can be accessed from a subnet. The
FQDN can also include SQL instances.
Network rules that define source address, protocol, destination port, and destination address.
Network traffic is subjected to the configured firewall rules when you route your network traffic to the firewall
as the subnet default gateway.
For this article, you create a simplified single VNet with three subnets for easy deployment. For production
deployments, a hub and spoke model is recommended. The firewall is in its own VNet. The workload servers are
in peered VNets in the same region with one or more subnets.
AzureFirewallSubnet - the firewall is in this subnet.
Workload-SN - the workload server is in this subnet. This subnet's network traffic goes through the firewall.
Jump-SN - The "jump" server is in this subnet. The jump server has a public IP address that you can connect
to using Remote Desktop. From there, you can then connect to (using another Remote Desktop) the workload
server.
Prerequisites
Use the Bash environment in Azure Cloud Shell. For more information, see Azure Cloud Shell Quickstart -
Bash.
If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows
or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the
Azure CLI in a Docker container.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish
the authentication process, follow the steps displayed in your terminal. For other sign-in options,
see Sign in with the Azure CLI.
When you're prompted, install the Azure CLI extension on first use. For more information about
extensions, see Use extensions with the Azure CLI.
Run az version to find the version and dependent libraries that are installed. To upgrade to the
latest version, run az upgrade.
This article requires version 2.0.4 or later of the Azure CLI. If using Azure Cloud Shell, the latest version is
already installed.
Create a VNet
This virtual network has three subnets.
NOTE
The size of the AzureFirewallSubnet subnet is /26. For more information about the subnet size, see Azure Firewall FAQ.
az network vnet create \
--name Test-FW-VN \
--resource-group Test-FW-RG \
--___location eastus \
--address-prefix 10.0.0.0/16 \
--subnet-name AzureFirewallSubnet \
--subnet-prefix 10.0.1.0/26
az network vnet subnet create \
--name Workload-SN \
--resource-group Test-FW-RG \
--vnet-name Test-FW-VN \
--address-prefix 10.0.2.0/24
az network vnet subnet create \
--name Jump-SN \
--resource-group Test-FW-RG \
--vnet-name Test-FW-VN \
--address-prefix 10.0.3.0/24
az vm create \
--resource-group Test-FW-RG \
--name Srv-Jump \
--___location eastus \
--image win2016datacenter \
--vnet-name Test-FW-VN \
--subnet Jump-SN \
--admin-username azureadmin
az vm open-port --port 3389 --resource-group Test-FW-RG --name Srv-Jump
Create a NIC for Srv-Work with specific DNS server IP addresses and no public IP address to test with.
Now create the workload virtual machine. When prompted, type a password for the virtual machine.
az vm create \
--resource-group Test-FW-RG \
--name Srv-Work \
--___location eastus \
--image win2016datacenter \
--nics Srv-Work-NIC \
--admin-username azureadmin
NOTE
Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the back-end
pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP
address that isn't configurable.
For more information, see Default outbound access in Azure.
The default outbound access IP is disabled when either a public IP address is assigned to the VM or the VM is placed in
the back-end pool of a standard load balancer, with or without outbound rules. If an Azure Virtual Network network
address translation (NAT) gateway resource is assigned to the subnet of the virtual machine, the default outbound access
IP is disabled.
VMs that are created by virtual machine scale sets in flexible orchestration mode don't have default outbound access.
For more information about outbound connections in Azure, see Use source network address translation (SNAT) for
outbound connections.
Note the private IP address. You'll use it later when you create the default route.
Azure Firewall includes a built-in rule collection for infrastructure FQDNs that are allowed by default. These
FQDNs are specific for the platform and can't be used for other purposes. For more information, see
Infrastructure FQDNs.
2. Connect a remote desktop to Sr v-Jump virtual machine, and sign in. From there, open a remote desktop
connection to the Sr v-Work private IP address and sign in.
3. On SRV-Work , open a PowerShell window and run the following commands:
nslookup www.google.com
nslookup www.microsoft.com
Both commands should return answers, showing that your DNS queries are getting through the firewall.
4. Run the following commands:
The www.google.com requests should succeed, and the www.microsoft.com requests should fail. This
demonstrates that your firewall rules are operating as expected.
So now you've verified that the firewall rules are working:
You can resolve DNS names using the configured external DNS server.
You can browse to the one allowed FQDN, but not to any others.
Clean up resources
You can keep your firewall resources for the next tutorial, or if no longer needed, delete the Test-FW-RG
resource group to delete all firewall-related resources:
az group delete \
-n Test-FW-RG
Next steps
Tutorial: Monitor Azure Firewall logs
Deploy an Azure Firewall with multiple public IP
addresses using Azure PowerShell
8/4/2022 • 2 minutes to read • Edit Online
NOTE
You can't remove the first ipConfiguration from the Azure Firewall public IP address configuration page. If you want to
modify the IP address, you can use Azure PowerShell.
$rgName = "resourceGroupName"
$vnet = Get-AzVirtualNetwork `
-Name "vnet" `
-ResourceGroupName $rgName
$pip1 = New-AzPublicIpAddress `
-Name "AzFwPublicIp1" `
-ResourceGroupName "rg" `
-Sku "Standard" `
-Location "centralus" `
-AllocationMethod Static
$pip2 = New-AzPublicIpAddress `
-Name "AzFwPublicIp2" `
-ResourceGroupName "rg" `
-Sku "Standard" `
-Location "centralus" `
-AllocationMethod Static
New-AzFirewall `
-Name "azFw" `
-ResourceGroupName $rgName `
-Location centralus `
-VirtualNetwork $vnet `
-PublicIpAddress @($pip1, $pip2)
Add a public IP address to an existing firewall
In this example, the public IP address azFwPublicIp1 is attached to the firewall.
$pip = New-AzPublicIpAddress `
-Name "azFwPublicIp1" `
-ResourceGroupName "rg" `
-Sku "Standard" `
-Location "centralus" `
-AllocationMethod Static
$azFw = Get-AzFirewall `
-Name "AzureFirewall" `
-ResourceGroupName "rg"
$azFw.AddPublicIpAddress($pip)
$azFw | Set-AzFirewall
$pip = Get-AzPublicIpAddress `
-Name "azFwPublicIp1" `
-ResourceGroupName "rg"
$azFw = Get-AzFirewall `
-Name "AzureFirewall" `
-ResourceGroupName "rg"
$azFw.RemovePublicIpAddress($pip)
$azFw | Set-AzFirewall
Next steps
Quickstart: Create an Azure Firewall with multiple public IP addresses - Resource Manager template
Deploy an Azure Firewall with Availability Zones
using Azure PowerShell
8/4/2022 • 2 minutes to read • Edit Online
Azure Firewall can be configured during deployment to span multiple Availability Zones for increased
availability.
This feature enables the following scenarios:
You can increase availability to 99.99% uptime. For more information, see the Azure Firewall Service Level
Agreement (SLA). The 99.99% uptime SLA is offered when two or more Availability Zones are selected.
You can also associate Azure Firewall to a specific zone just for proximity reasons, using the service standard
99.95% SLA.
For more information about Azure Firewall Availability Zones, see What is Azure Firewall?
The following Azure PowerShell example shows how you can deploy an Azure Firewall with Availability Zones.
$rgName = "resourceGroupName"
$vnet = Get-AzVirtualNetwork `
-Name "vnet" `
-ResourceGroupName $rgName
$pip1 = New-AzPublicIpAddress `
-Name "AzFwPublicIp1" `
-ResourceGroupName "rg" `
-Sku "Standard" `
-Location "centralus" `
-AllocationMethod Static
New-AzFirewall `
-Name "azFw" `
-ResourceGroupName $rgName `
-Location centralus `
-VirtualNetwork $vnet `
-PublicIpAddress @($pip1) `
-Zone 1,2,3
Next steps
Tutorial: Monitor Azure Firewall logs
Integrate Azure Firewall with Azure Standard Load
Balancer
8/4/2022 • 3 minutes to read • Edit Online
You can integrate an Azure Firewall into a virtual network with an Azure Standard Load Balancer (either public or
internal).
The preferred design is to integrate an internal load balancer with your Azure firewall, as this is a much simpler
design. You can use a public load balancer if you already have one deployed and you want to keep it in place.
However, you need to be aware of an asymmetric routing issue that can break functionality with the public load
balancer scenario.
For more information about Azure Load Balancer, see What is Azure Load Balancer?
Health probes
Remember, you need to have a web service running on the hosts in the load balancer pool if you use TCP health
probes to port 80, or HTTP/HTTPS probes.
Additional security
To further enhance the security of your load-balanced scenario, you can use network security groups (NSGs).
For example, you can create an NSG on the backend subnet where the load-balanced virtual machines are
located. Allow incoming traffic originating from the firewall IP address/port.
Next steps
Learn how to deploy and configure an Azure Firewall.
Configure Azure Firewall application rules with SQL
FQDNs
8/4/2022 • 2 minutes to read • Edit Online
You can now configure Azure Firewall application rules with SQL FQDNs. This allows you to limit access from
your virtual networks to only the specified SQL server instances.
With SQL FQDNs, you can filter traffic:
From your VNets to an Azure SQL Database or Azure Synapse Analytics. For example: Only allow access to
sql-server1.database.windows.net.
From on-premises to Azure SQL Managed Instances or SQL IaaS running in your VNets.
From spoke-to-spoke to Azure SQL Managed Instances or SQL IaaS running in your VNets.
SQL FQDN filtering is supported in proxy-mode only (port 1433). If you use SQL in the default redirect mode,
you can filter access using the SQL service tag as part of network rules. If you use non-default ports for SQL
IaaS traffic, you can configure those ports in the firewall application rules.
NOTE
SQL proxy mode can result in more latency compared to redirect. If you want to continue using redirect mode,
which is the default for clients connecting within Azure, you can filter access using the SQL service tag in firewall
network rules.
3. Create a new rule collection with an application rule using SQL FQDN to allow access to a SQL server:
NOTE
SQL proxy mode can result in more latency compared to redirect. If you want to continue using redirect mode,
which is the default for clients connecting within Azure, you can filter access using the SQL service tag in firewall
network rules.
3. Create a new rule collection with an application rule using SQL FQDN to allow access to a SQL server:
$sqlRule = @{
Name = "sqlRule"
Protocol = "mssql:1433"
TargetFqdn = "sql-serv1.database.windows.net"
SourceAddress = "10.0.0.0/24"
}
$sqlRuleCollection = @{
Name = "sqlRuleCollection"
Priority = 1000
Rule = $rule
ActionType = "Allow"
}
$Azfw.ApplicationRuleCollections.Add($ruleCollection)
Set-AzFirewall -AzureFirewall $AzFw
NOTE
SQL proxy mode can result in more latency compared to redirect. If you want to continue using redirect mode,
which is the default for clients connecting within Azure, you can filter access using the SQL service tag in firewall
network rules.
3. Add the application rule with the appropriate protocol, port, and SQL FQDN and then select Save .
4. Access SQL from a virtual machine in a VNet that filters the traffic through the firewall.
5. Validate that Azure Firewall logs show the traffic is allowed.
Next steps
To learn about SQL proxy and redirect modes, see Azure SQL Database connectivity architecture.
Azure Firewall SNAT private IP address ranges
8/4/2022 • 4 minutes to read • Edit Online
Azure Firewall provides automatic SNAT for all outbound traffic to public IP addresses. By default, Azure Firewall
doesn't SNAT with Network rules when the destination IP address is in a private IP address range per IANA RFC
1918 or shared address space per IANA RFC 6598. Application rules are always applied using a transparent
proxy whatever the destination IP address.
This logic works well when you route traffic directly to the Internet. However, if you've enabled forced tunneling,
Internet-bound traffic is SNATed to one of the firewall private IP addresses in AzureFirewallSubnet, hiding the
source from your on-premises firewall.
If your organization uses a public IP address range for private networks, Azure Firewall SNATs the traffic to one
of the firewall private IP addresses in AzureFirewallSubnet. However, you can configure Azure Firewall to not
SNAT your public IP address range. For example, to specify an individual IP address you can specify it like this:
192.168.1.10 . To specify a range of IP addresses, you can specify it like this: 192.168.1.0/24 .
To configure Azure Firewall to never SNAT regardless of the destination IP address, use 0.0.0.0/0 as
your private IP address range. With this configuration, Azure Firewall can never route traffic directly to
the Internet.
To configure the firewall to always SNAT regardless of the destination address, use
255.255.255.255/32 as your private IP address range.
IMPORTANT
The private address range that you specify only applies to network rules. Currently, application rules always SNAT.
IMPORTANT
If you want to specify your own private IP address ranges, and keep the default IANA RFC 1918 address ranges, make
sure your custom list still includes the IANA RFC 1918 range.
You can configure the SNAT private IP addresses using the following methods. You must configure the SNAT
private addresses using the method appropriate for your configuration. Firewalls associated with a firewall
policy must specify the range in the policy and not use AdditionalProperties .
NOTE
The firewall PrivateRange property is ignored for firewalls associated with a Firewall Policy. You must use the SNAT
property in firewallPolicies as described in Configure SNAT private IP address ranges - ARM template.
New firewall
For a new firewall using classic rules, the Azure PowerShell cmdlet is:
$azFw = @{
Name = '<fw-name>'
ResourceGroupName = '<resourcegroup-name>'
Location = '<___location>'
VirtualNetworkName = '<vnet-name>'
PublicIpName = '<public-ip-name>'
PrivateRange = @("IANAPrivateRanges", "192.168.1.0/24", "192.168.1.10")
}
New-AzFirewall @azFw
NOTE
Deploying Azure Firewall using New-AzFirewall requires an existing VNet and Public IP address. See Deploy and
configure Azure Firewall using Azure PowerShell for a full deployment guide.
NOTE
IANAPrivateRanges is expanded to the current defaults on Azure Firewall while the other ranges are added to it. To keep
the IANAPrivateRanges default in your private range specification, it must remain in your PrivateRange specification as
shown in the following examples.
NOTE
Deploying Azure Firewall using Azure CLI command az network firewall create requires additional configuration
steps to create public IP addresses and IP configuration. See Deploy and configure Azure Firewall using Azure CLI for a full
deployment guide.
NOTE
IANAPrivateRanges is expanded to the current defaults on Azure Firewall while the other ranges are added to it. To keep
the IANAPrivateRanges default in your private range specification, it must remain in your private-ranges specification
as shown in the following examples.
Existing firewall
To configure an existing firewall using classic rules, the Azure CLI command is:
"additionalProperties": {
"Network.SNAT.PrivateRanges": "IANAPrivateRanges , IPRange1, IPRange2"
},
Firewall policy
Azure Firewalls associated with a firewall policy have supported SNAT private ranges since the 2020-11-01 API
version. Currently, you can use a template to update the SNAT private range on the Firewall Policy. The following
sample configures the firewall to always SNAT network traffic:
{
"type":"Microsoft.Network/firewallPolicies",
"apiVersion":"2020-11-01",
"name":"[parameters('firewallPolicies_DatabasePolicy_name')]",
"___location":"eastus",
"properties":{
"sku":{
"tier":"Standard"
},
"snat":{
"privateRanges":[255.255.255.255/32]
}
}
Next steps
Learn about Azure Firewall forced tunneling.
Create IP Groups
8/4/2022 • 2 minutes to read • Edit Online
IP Groups allow you to group and manage IP addresses for Azure Firewall rules. They can have a single IP
address, multiple IP addresses, or one or more IP address ranges.
$ipGroup = @{
Name = 'ipGroup'
ResourceGroupName = 'ipGroupRG'
Location = 'West US'
IpAddress = @('10.0.0.0/24', '192.168.1.10')
}
New-AzIpGroup @ipGroup
Next steps
Learn more about IP Groups
Use Azure Firewall to protect Azure Virtual Desktop
deployments
8/4/2022 • 3 minutes to read • Edit Online
Azure Virtual Desktop is a desktop and app virtualization service that runs on Azure. When an end user
connects to an Azure Virtual Desktop environment, their session is run by a host pool. A host pool is a collection
of Azure virtual machines that register to Azure Virtual Desktop as session hosts. These virtual machines run in
your virtual network and are subject to the virtual network security controls. They need outbound Internet
access to the Azure Virtual Desktop service to operate properly and might also need outbound Internet access
for end users. Azure Firewall can help you lock down your environment and filter outbound traffic.
Follow the guidelines in this article to provide additional protection for your Azure Virtual Desktop host pool
using Azure Firewall.
Prerequisites
A deployed Azure Virtual Desktop environment and host pool.
An Azure Firewall deployed with at least one Firewall Manager Policy
For more information, see Tutorial: Create a host pool by using the Azure portal
To learn more about Azure Virtual Desktop environments see Azure Virtual Desktop environment.
NOTE
Some deployments might not need DNS rules. For example, Azure Active Directory Domain controllers forward DNS
queries to Azure DNS at 168.63.129.16.
IMPORTANT
We recommend that you don't use TLS inspection with Azure Virtual Desktop. For more information, see the proxy server
guidelines.
Additional considerations
You might need to configure additional firewall rules, depending on your requirements:
NTP server access
By default, virtual machines running Windows connect to time.windows.com over UDP port 123 for time
synchronization. Create a network rule to allow this access, or for a time server that you use in your
environment.
Next steps
Learn more about Azure Virtual Desktop: What is Azure Virtual Desktop?
Use Azure Firewall to protect Azure Kubernetes
Service (AKS) clusters
8/4/2022 • 15 minutes to read • Edit Online
This article shows you how you can protect Azure Kubernetes Service (AKS) clusters by using Azure Firewall to
secure outbound and inbound traffic.
Background
Azure Kubernetes Service (AKS) offers a managed Kubernetes cluster on Azure. For more information, see Azure
Kubernetes Service.
Despite AKS being a fully managed solution, it does not offer a built-in solution to secure ingress and egress
traffic between the cluster and external networks. Azure Firewall offers a solution to this.
AKS clusters are deployed on a virtual network. This network can be managed (created by AKS) or custom (pre-
configured by the user beforehand). In either case, the cluster has outbound dependencies on services outside
of that virtual network (the service has no inbound dependencies). For management and operational purposes,
nodes in an AKS cluster need to access certain ports and fully qualified ___domain names (FQDNs) describing these
outbound dependencies. This is required for various functions including, but not limited to, the nodes that
communicate with the Kubernetes API server. They download and install core Kubernetes cluster components
and node security updates, or pull base system container images from Microsoft Container Registry (MCR), and
so on. These outbound dependencies are almost entirely defined with FQDNs, which don't have static addresses
behind them. The lack of static addresses means that Network Security Groups can't be used to lock down
outbound traffic from an AKS cluster. For this reason, by default, AKS clusters have unrestricted outbound
(egress) Internet access. This level of network access allows nodes and services you run to access external
resources as needed.
However, in a production environment, communications with a Kubernetes cluster should be protected to
prevent against data exfiltration along with other vulnerabilities. All incoming and outgoing network traffic must
be monitored and controlled based on a set of security rules. If you want to do this, you will have to restrict
egress traffic, but a limited number of ports and addresses must remain accessible to maintain healthy cluster
maintenance tasks and satisfy those outbound dependencies previously mentioned.
The simplest solution uses a firewall device that can control outbound traffic based on ___domain names. A firewall
typically establishes a barrier between a trusted network and an untrusted network, such as the Internet. Azure
Firewall, for example, can restrict outbound HTTP and HTTPS traffic based on the FQDN of the destination,
giving you fine-grained egress traffic control, but at the same time allows you to provide access to the FQDNs
encompassing an AKS cluster’s outbound dependencies (something that NSGs cannot do). Likewise, you can
control ingress traffic and improve security by enabling threat intelligence-based filtering on an Azure Firewall
deployed to a shared perimeter network. This filtering can provide alerts, and deny traffic to and from known
malicious IP addresses and domains.
See the following video by Abhinav Sriram for a quick overview on how this works in practice on a sample
environment:
You can download a zip file from the Microsoft Download Center that contains a bash script file and a yaml file
to automatically configure the sample environment used in the video. It configures Azure Firewall to protect
both ingress and egress traffic. The following guides walk through each step of the script in more detail so you
can set up a custom configuration.
The following diagram shows the sample environment from the video that the script and guide configure:
There is one difference between the script and the following guide. The script uses managed identities, but the
guide uses a service principal. This shows you two different ways to create an identity to manage and create
cluster resources.
PREFIX="aks-egress"
RG="${PREFIX}-rg"
LOC="eastus"
PLUGIN=azure
AKSNAME="${PREFIX}"
VNET_NAME="${PREFIX}-vnet"
AKSSUBNET_NAME="aks-subnet"
# DO NOT CHANGE FWSUBNET_NAME - This is currently a requirement for Azure Firewall.
FWSUBNET_NAME="AzureFirewallSubnet"
FWNAME="${PREFIX}-fw"
FWPUBLICIP_NAME="${PREFIX}-fwpublicip"
FWIPCONFIG_NAME="${PREFIX}-fwconfig"
FWROUTE_TABLE_NAME="${PREFIX}-fwrt"
FWROUTE_NAME="${PREFIX}-fwrn"
FWROUTE_NAME_INTERNET="${PREFIX}-fwinternet"
Create a virtual network with two subnets to host the AKS cluster and the Azure Firewall. Each will have their
own subnet. Let's start with the AKS network.
Create a standard SKU public IP resource that will be used as the Azure Firewall frontend address.
The IP address created earlier can now be assigned to the firewall frontend.
NOTE
Set up of the public IP address to the Azure Firewall may take a few minutes. To leverage FQDN on network rules we need
DNS proxy enabled, when enabled the firewall will listen on port 53 and will forward DNS requests to the DNS server
specified above. This will allow the firewall to translate that FQDN automatically.
When the previous command has succeeded, save the firewall frontend IP address for configuration later.
# Capture Firewall IP Address for Later Use
NOTE
If you use secure access to the AKS API server with authorized IP address ranges, you need to add the firewall public IP
into the authorized IP range.
See virtual network route table documentation about how you can override Azure's default system routes or
add additional routes to a subnet's route table.
Adding firewall rules
NOTE
For applications outside of the kube-system or gatekeeper-system namespaces that needs to talk to the API server, an
additional network rule to allow TCP communication to port 443 for the API server IP in addition to adding application
rule for fqdn-tag AzureKubernetesService is required.
Below are three network rules you can use to configure on your firewall, you may need to adapt these rules
based on your deployment. The first rule allows access to port 9000 via TCP. The second rule allows access to
port 1194 and 123 via UDP. Both these rules will only allow traffic destined to the Azure Region CIDR that we're
using, in this case East US. Finally, we'll add a third network rule opening port 123 to ntp.ubuntu.com FQDN via
UDP (adding an FQDN as a network rule is one of the specific features of Azure Firewall, and you'll need to
adapt it when using your own options).
After setting the network rules, we'll also add an application rule using the AzureKubernetesService that covers
all needed FQDNs accessible through TCP port 443 and port 80.
# Add FW Network Rules
See Azure Firewall documentation to learn more about the Azure Firewall service.
Associate the route table to AKS
To associate the cluster with the firewall, the dedicated subnet for the cluster's subnet must reference the route
table created above. Association can be done by issuing a command to the virtual network holding both the
cluster and firewall to update the route table of the cluster's subnet.
# Associate route table with next hop to Firewall to the AKS subnet
az network vnet subnet update -g $RG --vnet-name $VNET_NAME --name $AKSSUBNET_NAME --route-table
$FWROUTE_TABLE_NAME
The target subnet to be deployed into is defined with the environment variable, $SUBNETID . We didn't define the
$SUBNETID variable in the previous steps. To set the value for the subnet ID, you can use the following command:
SUBNETID=$(az network vnet subnet show -g $RG --vnet-name $VNET_NAME --name $AKSSUBNET_NAME --query id -o
tsv)
You'll define the outbound type to use the UDR that already exists on the subnet. This configuration will enable
AKS to skip the setup and IP provisioning for the load balancer.
IMPORTANT
For more information on outbound type UDR including limitations, see egress outbound type UDR.
TIP
Additional features can be added to the cluster deployment such as Private Cluster .
The AKS feature for API ser ver authorized IP ranges can be added to limit API server access to only the firewall's
public endpoint. The authorized IP ranges feature is denoted in the diagram as optional. When enabling the authorized IP
range feature to limit API server access, your developer tools must use a jumpbox from the firewall's virtual network or
you must add all developer endpoints to the authorized IP range.
NOTE
For creating and using your own VNet and route table where the resources are outside of the worker node resource
group, the CLI will add the role assignment automatically. If you are using an ARM template or other client, you need to
use the Principal ID of the cluster managed identity to perform a [role assignment.][add role to identity]
If you are not using the CLI but using your own VNet or route table which are outside of the worker node resource
group, it's recommended to use [user-assigned control plane identity][Bring your own control plane managed identity].
For system-assigned control plane identity, we cannot get the identity ID before creating cluster, which causes delay for
role assignment to take effect.
Use the [az aks get-credentials][az-aks-get-credentials] command to configure kubectl to connect to your
newly created Kubernetes cluster.
az aks get-credentials -g $RG -n $AKSNAME
Deploy the Azure voting app application by copying the yaml below to a file named example.yaml .
# voting-storage-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: voting-storage
spec:
replicas: 1
selector:
matchLabels:
app: voting-storage
template:
metadata:
labels:
app: voting-storage
spec:
containers:
- name: voting-storage
image: mcr.microsoft.com/aks/samples/voting/storage:2.0
args: ["--ignore-db-dir=lost+found"]
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 250m
memory: 256Mi
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_ROOT_PASSWORD
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_USER
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_PASSWORD
- name: MYSQL_DATABASE
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_DATABASE
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
---
# voting-storage-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: voting-storage-secret
type: Opaque
data:
MYSQL_USER: ZGJ1c2Vy
MYSQL_PASSWORD: UGFzc3dvcmQxMg==
MYSQL_DATABASE: YXp1cmV2b3Rl
MYSQL_ROOT_PASSWORD: UGFzc3dvcmQxMg==
---
# voting-storage-pv-claim.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-pv-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
# voting-storage-service.yaml
apiVersion: v1
kind: Service
metadata:
name: voting-storage
labels:
app: voting-storage
spec:
ports:
- port: 3306
name: mysql
selector:
app: voting-storage
---
# voting-app-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: voting-app
name: voting-app
spec:
replicas: 1
selector:
matchLabels:
app: voting-app
template:
metadata:
labels:
app: voting-app
spec:
containers:
- name: voting-app
image: mcr.microsoft.com/aks/samples/voting/app:2.0
imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
env:
- name: MYSQL_HOST
value: "voting-storage"
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_USER
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_PASSWORD
- name: MYSQL_DATABASE
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_DATABASE
- name: ANALYTICS_HOST
value: "voting-analytics"
---
# voting-app-service.yaml
apiVersion: v1
kind: Service
metadata:
name: voting-app
labels:
app: voting-app
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
name: http
selector:
app: voting-app
---
# voting-analytics-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: voting-analytics
spec:
replicas: 1
selector:
matchLabels:
app: voting-analytics
version: "2.0"
template:
metadata:
labels:
app: voting-analytics
app: voting-analytics
version: "2.0"
spec:
containers:
- name: voting-analytics
image: mcr.microsoft.com/aks/samples/voting/analytics:2.0
imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
env:
- name: MYSQL_HOST
value: "voting-storage"
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_USER
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_PASSWORD
- name: MYSQL_DATABASE
valueFrom:
secretKeyRef:
name: voting-storage-secret
key: MYSQL_DATABASE
---
# voting-analytics-service.yaml
apiVersion: v1
kind: Service
metadata:
name: voting-analytics
labels:
app: voting-analytics
spec:
ports:
- port: 8080
name: http
selector:
app: voting-analytics
IMPORTANT
When you use Azure Firewall to restrict egress traffic and create a user-defined route (UDR) to force all egress traffic, make
sure you create an appropriate DNAT rule in Firewall to correctly allow ingress traffic. Using Azure Firewall with a UDR
breaks the ingress setup due to asymmetric routing. (The issue occurs if the AKS subnet has a default route that goes to
the firewall's private IP address, but you're using a public load balancer - ingress or Kubernetes service of type:
LoadBalancer). In this case, the incoming load balancer traffic is received via its public IP address, but the return path goes
through the firewall's private IP address. Because the firewall is stateful, it drops the returning packet because the firewall
isn't aware of an established session. To learn how to integrate Azure Firewall with your ingress or service load balancer,
see Integrate Azure Firewall with Azure Standard Load Balancer.
To configure inbound connectivity, a DNAT rule must be written to the Azure Firewall. To test connectivity to your
cluster, a rule is defined for the firewall frontend public IP address to route to the internal IP exposed by the
internal service.
The destination address can be customized as it's the port on the firewall to be accessed. The translated address
must be the IP address of the internal load balancer. The translated port must be the exposed port for your
Kubernetes service.
You'll need to specify the internal IP address assigned to the load balancer created by the Kubernetes service.
Retrieve the address by running:
The IP address needed will be listed in the EXTERNAL-IP column, similar to the following.
Validate connectivity
Navigate to the Azure Firewall frontend IP address in a browser to validate connectivity.
You should see the AKS voting app. In this example, the Firewall public IP was 52.253.228.132 .
Clean up resources
To clean up Azure resources, delete the AKS resource group.
az group delete -g $RG
Next steps
Learn more about Azure Kubernetes Service, see Kubernetes core concepts for Azure Kubernetes Service
(AKS).
Azure Firewall DNS settings
8/4/2022 • 5 minutes to read • Edit Online
You can configure a custom DNS server and enable DNS proxy for Azure Firewall. Configure these settings
when you deploy the firewall, or configure them later from the DNS settings page. By default, Azure Firewall
uses Azure DNS and DNS Proxy is disabled.
DNS servers
A DNS server maintains and resolves ___domain names to IP addresses. By default, Azure Firewall uses Azure DNS
for name resolution. The DNS ser ver setting lets you configure your own DNS servers for Azure Firewall name
resolution. You can configure a single server or multiple servers. If you configure multiple DNS servers, the
server used is chosen randomly. You can configure a maximum of 15 DNS servers in Custom DNS .
NOTE
For instances of Azure Firewall that are managed by using Azure Firewall Manager, the DNS settings are configured in the
associated Azure Firewall policy.
IMPORTANT
The command az network firewall requires the Azure CLI extension azure-firewall to be installed. You can install
it by using the command az extension add --name azure-firewall .
$azFw | Set-AzFirewall
DNS proxy
You can configure Azure Firewall to act as a DNS proxy. A DNS proxy is an intermediary for DNS requests from
client virtual machines to a DNS server.
If you want to enable FQDN (fully qualified ___domain name) filtering in network rules, enable DNS proxy and
update the virtual machine configuration to use the firewall as a DNS proxy.
If you enable FQDN filtering in network rules, and you don't configure client virtual machines to use the firewall
as a DNS proxy, then DNS requests from these clients might travel to a DNS server at a different time or return
a different response compared to that of the firewall. DNS proxy puts Azure Firewall in the path of the client
requests to avoid inconsistency.
When Azure Firewall is a DNS proxy, two caching function types are possible:
Positive cache : DNS resolution is successful. The firewall caches these responses according to the TTL
(time to live) in the response up to a maximum of 1 hour.
Negative cache : DNS resolution results in no response or no resolution. The firewall caches these
responses according to the TTL in the response, up to a max of 30 minutes.
The DNS proxy stores all resolved IP addresses from FQDNs in network rules. As a best practice, use FQDNs that
resolve to one IP address.
Policy inheritance
Policy DNS settings applied to a standalone firewall override the standalone firewall’s DNS settings. A child
policy inherits all parent policy DNS settings, but it can override the parent policy.
For example, to use FQDNs in network rule, DNS proxy should be enabled. But if a parent policy does not have
DNS proxy enabled, the child policy won't support FQDNs in network rules unless you locally override this
setting.
DNS proxy configuration
DNS proxy configuration requires three steps:
1. Enable the DNS proxy in Azure Firewall DNS settings.
2. Optionally, configure your custom DNS server or use the provided default.
3. Configure the Azure Firewall private IP address as a custom DNS address in your virtual network DNS server
settings. This setting ensures DNS traffic is directed to Azure Firewall.
Configure DNS proxy - Azure portal
To configure DNS proxy, you must configure your virtual network DNS servers setting to use the firewall private
IP address. Then enable the DNS proxy in the Azure Firewall DNS settings .
C o n fi g u r e v i r t u a l n e t w o r k D N S se r v e r s
1. Select the virtual network where the DNS traffic will be routed through the Azure Firewall instance.
2. Under Settings , select DNS ser vers .
3. Under DNS ser vers , select Custom .
4. Enter the firewall's private IP address.
5. Select Save .
6. Restart the VMs that are connected to the virtual network so they're assigned the new DNS server settings.
VMs continue to use their current DNS settings until they're restarted.
En a b l e D N S p r o x y
En a b l e D N S p r o x y
The following example enables the DNS proxy feature in Azure Firewall.
The following example configures the virtual network to use Azure Firewall as a DNS server.
$dnsServers = @("<firewall-private-IP>")
$VNet = Get-AzVirtualNetwork -Name "VNetName" -ResourceGroupName "VNetRG"
$VNet.DhcpOptions.DnsServers = $dnsServers
$VNet | Set-AzVirtualNetwork
En a b l e D N S p r o x y
The following example enables the DNS proxy feature in Azure Firewall.
$azFw | Set-AzFirewall
Next steps
Azure Firewall DNS Proxy details
FQDN filtering in network rules
Monitor Azure Firewall logs and metrics
8/4/2022 • 4 minutes to read • Edit Online
You can monitor Azure Firewall using firewall logs. You can also use activity logs to audit operations on Azure
Firewall resources. Using metrics, you can view performance counters in the portal.
You can access some of these logs through the portal. Logs can be sent to Azure Monitor logs, Storage, and
Event Hubs and analyzed in Azure Monitor logs or by different tools such as Excel and Power BI.
NOTE
This article was recently updated to use the term Azure Monitor logs instead of Log Analytics. Log data is still stored in a
Log Analytics workspace and is still collected and analyzed by the same Log Analytics service. We are updating the
terminology to better reflect the role of logs in Azure Monitor. See Azure Monitor terminology changes for details.
NOTE
This article uses the Azure Az PowerShell module, which is the recommended PowerShell module for interacting with
Azure. To get started with the Az PowerShell module, see Install Azure PowerShell. To learn how to migrate to the Az
PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.
Prerequisites
Before starting, you should read Azure Firewall logs and metrics for an overview of the diagnostics logs and
metrics available for Azure Firewall.
You can use any workspace in your subscription. You can use the Azure portal to find this information.
The information is located in the resource Proper ties page.
2. Note the resource ID for the firewall. This value is of the form:
/subscriptions/<subscriptionId>/resourceGroups/<resource group
name>/providers/Microsoft.Network/azureFirewalls/<Firewall name>
$diagSettings = @{
Name = 'toLogAnalytics'
ResourceId = '/subscriptions/<subscriptionId>/resourceGroups/<resource group
name>/providers/Microsoft.Network/azureFirewalls/<Firewall name>'
WorkspaceId = '/subscriptions/<subscriptionId>/resourceGroups/<resource group
name>/providers/microsoft.operationalinsights/workspaces/<workspace name>'
Enabled = $true
}
Set-AzDiagnosticSetting @diagSettings
You can use any workspace in your subscription. You can use the Azure portal to find this information.
The information is located in the resource Proper ties page.
2. Note the resource ID for the firewall. This value is of the form:
/subscriptions/<subscriptionId>/resourceGroups/<resource group
name>/providers/Microsoft.Network/azureFirewalls/<Firewall name>
TIP
If you are familiar with Visual Studio and basic concepts of changing values for constants and variables in C#, you can use
the log converter tools available from GitHub.
View metrics
Browse to an Azure Firewall. Under Monitoring , select Metrics . To view the available values, select the METRIC
drop-down list.
Next steps
Now that you've configured your firewall to collect logs, you can explore Azure Monitor logs to view your data.
Monitor logs using Azure Firewall Workbook
Networking monitoring solutions in Azure Monitor logs
Monitor logs using Azure Firewall Workbook
8/4/2022 • 2 minutes to read • Edit Online
Azure Firewall Workbook provides a flexible canvas for Azure Firewall data analysis. You can use it to create rich
visual reports within the Azure portal. You can tap into multiple Firewalls deployed across Azure, and combine
them into unified interactive experiences.
You can gain insights into Azure Firewall events, learn about your application and network rules, and see
statistics for firewall activities across URLs, ports, and addresses. Azure Firewall Workbook allows you to filter
your firewalls and resource groups, and dynamically filter per category with easy to read data sets when
investigating an issue in your logs.
Prerequisites
Before starting, you should enable diagnostic logging through the Azure portal. Also, read Azure Firewall logs
and metrics for an overview of the diagnostics logs and metrics available for Azure Firewall.
Get started
To deploy the workbook, go to Azure Monitor Workbook for Azure Firewall and following the instructions on the
page. Azure Firewall Workbook is designed to work across multi-tenants, multi-subscriptions, and is filterable to
multiple firewalls.
Overview page
The overview page provides you with a way to filter across workspaces, time, and firewalls. It shows events by
time across firewalls and log types (application, networks, threat intel, DNS proxy).
Investigations
You can look at the logs and understand more about the resource based on the source IP address. You can get
information like virtual machine name and network interface name. It's simple to filter to the resource from the
logs.
Next steps
Learn more about Azure Firewall Diagnostics
Deploy and configure Azure Firewall Premium
8/4/2022 • 5 minutes to read • Edit Online
Azure Firewall Premium is a next generation firewall with capabilities that are required for highly sensitive and
regulated environments. It includes the following features:
TLS Inspection - decrypts outbound traffic, processes the data, then encrypts the data and sends it to the
destination.
IDPS - A network intrusion detection and prevention system (IDPS) allows you to monitor network activities
for malicious activity, log information about this activity, report it, and optionally attempt to block it.
URL filtering - extends Azure Firewall’s FQDN filtering capability to consider an entire URL. For example,
www.contoso.com/a/c instead of www.contoso.com .
Web categories - administrators can allow or deny user access to website categories such as gambling
websites, social media websites, and others.
For more information, see Azure Firewall Premium features.
You'll use a template to deploy a test environment that has a central VNet (10.0.0.0/16) with three subnets:
a worker subnet (10.0.10.0/24)
an Azure Bastion subnet (10.0.20.0/24)
a firewall subnet (10.0.100.0/24)
A single central VNet is used in this test environment for simplicity. For production purposes, a hub and spoke
topology with peered VNets is more common.
The worker virtual machine is a client that sends HTTP/S requests through the firewall.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
Deploy the infrastructure
The template deploys a complete testing environment for Azure Firewall Premium enabled with IDPS, TLS
Inspection, URL Filtering, and Web Categories:
a new Azure Firewall Premium and Firewall Policy with predefined settings to allow easy validation of its core
capabilities (IDPS, TLS Inspection, URL Filtering, and Web Categories)
deploys all dependencies including Key Vault and a Managed Identity. In a production environment, these
resources may already be created and not needed in the same template.
generates self-signed Root CA and deploys it on the generated Key Vault
generates a derived Intermediate CA and deploys it on a Windows test virtual machine (WorkerVM)
a Bastion Host (BastionHost) is also deployed and can be used to connect to the Windows testing machine
(WorkerVM)
{ “msg” : “TCP request from 10.0.100.5:16036 to 10.0.20.10:80. Action: Alert. Rule: 2032081. IDS:
USER_AGENTS Suspicious User Agent (HaxerMen). Priority: 1. Classification: A Network Tojan was
detected”}
NOTE
It can take some time for the data to begin showing in the logs. Give it at least a couple minutes to allow for the
logs to begin showing the data.
Since the HTTP request is now blocked by the firewall, you'll see the following output after the connection
timeout expires:
read tcp 10.0.100.5:55734->10.0.20.10:80: read: connection reset by peer
7. Go to the Monitor logs in the Azure portal and find the message for the blocked request.
To test IDPS for HTTPS traffic
Repeat these curl tests using HTTPS instead of HTTP. For example:
curl --ssl-no-revoke -A "HaxerMen" <your web server address>
You should see the same results that you had with the HTTP tests.
TLS Inspection with URL filtering
Use the following steps to test TLS Inspection with URL filtering.
1. Edit the firewall policy application rules and add a new rule called AllowURL to the AllowWeb rule
collection. Configure the target URL www.nytimes.com/section/world , Source IP address * , Destination type
URL , select TLS Inspection , and protocols http, https .
2. When the deployment completes, open a browser on WorkerVM and go to
https://www.nytimes.com/section/world and validate that the HTML response is displayed as expected in
the browser.
3. In the Azure portal, you can view the entire URL in the Application rule Monitoring logs:
Some HTML pages may look incomplete because they refer to other URLs that are denied. To solve this issue,
the following approach can be taken:
If the HTML page contain links to other domains, you can add these domains to a new application rule
with allow access to these FQDNs.
If the HTML page contain links to sub URLs then you can modify the rule and add an asterisk to the URL.
For example: targetURLs=www.nytimes.com/section/world*
Alternatively, you can add a new URL to the rule. For example:
www.nytimes.com/section/world, www.nytimes.com/section/world/*
6. When the deployment completes, go to WorkerVM and open a web browser and browse to
https://www.nfl.com .
You should see the NFL web page, and the Application rule log shows that a Web Categor y: Spor ts
rule was matched and the request was allowed.
Next steps
Azure Firewall Premium in the Azure portal
Deploy and configure Enterprise CA certificates for
Azure Firewall
8/4/2022 • 2 minutes to read • Edit Online
Azure Firewall Premium includes a TLS inspection feature, which requires a certificate authentication chain. For
production deployments, you should use an Enterprise PKI to generate the certificates that you use with Azure
Firewall Premium. Use this article to create and manage an Intermediate CA certificate for Azure Firewall
Premium.
For more information about certificates used by Azure Firewall Premium, see Azure Firewall Premium
certificates.
Prerequisites
If you don't have an Azure subscription, create a free account before you begin.
To use an Enterprise CA to generate a certificate to use with Azure Firewall Premium, you must have the
following resources:
an Active Directory Forest
an Active Directory Certification Services Root CA with Web Enrollment enabled
an Azure Firewall Premium with Premium tier Firewall Policy
an Azure Key Vault
a Managed Identity with Read permissions to Cer tificates and Secrets defined in the Key Vault Access
Policy
9. Select Next to begin the wizard. Select Yes, expor t the private key , and then select Next .
10. .pfx file format is selected by default. Uncheck Include all cer tificates in the cer tification path if
possible . If you export the entire certificate chain, the import process to Azure Firewall will fail.
11. Assign and confirm a password to protect the key, and then select Next .
12. Choose a file name and export ___location and then select Next .
13. Select Finish and move the exported certificate to a secure ___location.
2. From a ___domain-joined machine within the Source range of the rule, navigate to your Destination and select
the lock symbol next to the address bar in your browser. The certificate should show that it was issued by
your Enterprise CA rather than a public CA.
3. Show the certificate to display more details, including the certificate path.
4. In Log Analytics, run the following KQL query to return all requests that have been subject to TLS Inspection:
AzureDiagnostics
| where ResourceType == "AZUREFIREWALLS"
| where Category == "AzureFirewallApplicationRule"
| where msg_s contains "Url:"
| sort by TimeGenerated desc
Next steps
Azure Firewall Premium in the Azure portal
Migrate to Azure Firewall Premium
8/4/2022 • 6 minutes to read • Edit Online
You can migrate Azure Firewall Standard to Azure Firewall Premium to take advantage of the new Premium
capabilities. For more information about Azure Firewall Premium features, see Azure Firewall Premium features.
This article guides you with the required steps to manually migrate your Standard firewall and policy to
Premium.
Before you start the migration, understand the performance considerations and plan ahead for the required
maintenance window. Typical down time of 20-30 minutes is expected.
The following general steps are required for a successful migration:
1. Create new Premium policy based on your existing Standard policy or classic rules. By the end of this step
your new premium policy will include all your existing rules and policy settings.
Migrate Classic rules to Standard policy
Migrate an existing policy using Azure PowerShell
2. Migrate Azure Firewall from Standard to Premium using stop/start.
3. Attach the newly created Premium policy to your Premium Firewall.
IMPORTANT
Upgrading a Standard Firewall deployed in Southeast Asia with Availability Zones is not currently supported.
If you use Terraform to deploy the Azure Firewall, you can use Terraform to migrate to Azure Firewall Premium.
For more information, see Migrate Azure Firewall Standard to Premium using Terraform.
Performance considerations
Performance is a consideration when migrating from the standard SKU. IDPS and TLS inspection are compute
intensive operations. The premium SKU uses a more powerful VM SKU, which scales to a maximum throughput
of 30 Gbps comparable with the standard SKU. The 30-Gbps throughput is supported when configured with
IDPS in alert mode. Use of IDPS in deny mode and TLS inspection increases CPU consumption. Degradation in
max throughput might occur.
The firewall throughput might be lower than 30 Gbps when you’ve one or more signatures set to Aler t and
Deny or application rules with TLS inspection enabled. Microsoft recommends customers perform full-scale
testing in their Azure deployment to ensure the firewall service performance meets your expectations.
Downtime
Migrate your firewall during a planned maintenance time, as there will be some downtime when you Migrate
Azure Firewall from Standard to Premium using stop/start.
IMPORTANT
The script doesn't migrate Threat Intelligence and SNAT private ranges settings. You'll need to note those settings before
proceeding and migrate them manually. Otherwise, you might encounter inconsistent traffic filtering with your new
upgraded firewall.
This script requires the latest Azure PowerShell. Run Get-Module -ListAvailable Az to see which versions are
installed. If you need to install, see Install Azure PowerShell module.
<#
.SYNOPSIS
Given an Azure firewall policy id the script will transform it to a Premium Azure firewall policy.
The script will first pull the policy, transform/add various parameters and then upload a new
premium policy.
The created policy will be named <previous_policy_name>_premium if no new name provided else new
policy will be named as the parameter passed.
.Example
Transform-Policy -PolicyId /subscriptions/XXXXX-XXXXXX-XXXXX/resourceGroups/some-resource-
group/providers/Microsoft.Network/firewallPolicies/policy-name -NewPolicyName <optional param for the new
policy name>
#>
param (
#Resource id of the azure firewall policy.
#Resource id of the azure firewall policy.
[Parameter(Mandatory=$true)]
[string]
$PolicyId,
#new filewallpolicy name, if not specified will be the previous name with the '_premium' suffix
[Parameter(Mandatory=$false)]
[string]
$NewPolicyName = ""
)
$ErrorActionPreference = "Stop"
$script:PolicyId = $PolicyId
$script:PolicyName = $NewPolicyName
function ValidatePolicy {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[Object]
$Policy
)
function GetPolicyNewName {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[Microsoft.Azure.Commands.Network.Models.PSAzureFirewallPolicy]
$Policy
)
if (-not [string]::IsNullOrEmpty($script:PolicyName)) {
return $script:PolicyName
}
function TransformPolicyToPremium {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[Microsoft.Azure.Commands.Network.Models.PSAzureFirewallPolicy]
$Policy
)
$NewPolicyParameters = @{
Name = (GetPolicyNewName -Policy $Policy)
ResourceGroupName = $Policy.ResourceGroupName
Location = $Policy.Location
ThreatIntelMode = $Policy.ThreatIntelMode
BasePolicy = $Policy.BasePolicy.Id
DnsSetting = $Policy.DnsSettings
Tag = $Policy.Tag
SkuTier = "Premium"
}
if ($ruleToTransfom.Properties.RuleCollection.Count) {
$ruleCollectionGroup["RuleCollection"] = $ruleToTransfom.Properties.RuleCollection
}
Set-AzFirewallPolicyRuleCollectionGroup @ruleCollectionGroup
}
}
function ValidateAzNetworkModuleExists {
Write-Host "Validating needed module exists"
$networkModule = Get-InstalledModule -Name "Az.Network" -MinimumVersion 4.5 -ErrorAction
SilentlyContinue
if ($null -eq $networkModule) {
Write-Host "Please install Az.Network module version 4.5.0 or higher, see instructions:
https://github.com/Azure/azure-powershell#installation"
exit(1)
}
$resourceModule = Get-InstalledModule -Name "Az.Resources" -MinimumVersion 4.2 -ErrorAction
SilentlyContinue
if ($null -eq $resourceModule) {
Write-Host "Please install Az.Resources module version 4.2.0 or higher, see instructions:
https://github.com/Azure/azure-powershell#installation"
exit(1)
}
Import-Module Az.Network -MinimumVersion 4.5.0
Import-Module Az.Resources -MinimumVersion 4.2.0
}
ValidateAzNetworkModuleExists
$policy = Get-AzFirewallPolicy -ResourceId $script:PolicyId
ValidatePolicy -Policy $policy
TransformPolicyToPremium -Policy $policy
Azure Firewall provides 2496 SNAT ports per public IP address configured per backend virtual machine scale set
instance (Minimum of 2 instances), and you can associate up to 250 public IP addresses. Depending on your
architecture and traffic patterns, you might need more than the 512,000 available SNAT ports with this
configuration. For example, when you use it to protect large Azure Virtual Desktop deployments that integrate
with Microsoft 365 Apps.
Another challenge with using a large number of public IP addresses is when there are downstream IP address
filtering requirements. Azure Firewall randomly selects the source public IP address to use for a connection, so
you need to allow all public IP addresses associated with it. Even if you use Public IP address prefixes and you
need to associate 250 public IP addresses to meet your outbound SNAT port requirements, you still need to
create and allow 16 public IP address prefixes.
A better option to scale outbound SNAT ports is to use an Azure Virtual Network NAT as a NAT gateway. It
provides 64,000 SNAT ports per public IP address and supports up to 16 public IP addresses, effectively
providing up to 1,024,000 outbound SNAT ports.
When a NAT gateway resource is associated with an Azure Firewall subnet, all outbound Internet traffic
automatically uses the public IP address of the NAT gateway. There’s no need to configure User Defined Routes.
Response traffic uses the Azure Firewall public IP address to maintain flow symmetry. If there are multiple IP
addresses associated with the NAT gateway, the IP address is randomly selected. It isn't possible to specify what
address to use.
There’s no double NAT with this architecture. Azure Firewall instances send the traffic to NAT gateway using
their private IP address rather than Azure Firewall public IP address.
NOTE
Using Azure Virtual Network NAT is currently incompatible with Azure Firewall if you have deployed your Azure Firewall
across multiple availability zones.
In addition, Azure Virtual Network NAT integration is not currently supported in secured virtual hub network
architectures. You must deploy using a hub virtual network architecture. For more information about Azure Firewall
architecture options, see What are the Azure Firewall Manager architecture options?.
Next steps
Design virtual networks with NAT gateway
Add or modify multiple Azure Firewall rules using
Azure PowerShell
8/4/2022 • 2 minutes to read • Edit Online
When you add new rules to Azure Firewall or Azure Firewall policy, you should use the following steps to reduce
the total update time:
1. Retrieve the Azure Firewall or Azure Firewall Policy object.
2. Add all new rules and perform other desired modifications in the local object. You can add them to an
existing rule collection or create new ones as needed.
3. Push the Firewall or the Firewall Policy updates only when all modifications are done.
The following example shows how to add multiple new DNAT rules to an existing firewall policy using Azure
PowerShell. You should follow these same principles also when:
You update Application or Network rules.
You update a firewall managed with classic rules.
Carefully review the following steps. You should first try it on a test policy to ensure it works as expected for
your needs.
Create local objects of the firewall policy, rule collection group, and
rule collection
$policy = Get-AzFirewallPolicy -Name "<Policy Name>" -ResourceGroupName "<Resource Group Name>"
$natrulecollectiongroup = Get-AzFirewallPolicyRuleCollectionGroup -Name "<Rule Collection Group Name>" -
ResourceGroupName "<Resource Group Name>" -AzureFirewallPolicyName "<Firewall Policy Name>"
$existingrulecollection = $natrulecollectiongroup.Properties.RuleCollection | where {$_.Name -eq "<rule
collection name"}
Use this step to add any more rules, or perform any modifications to existing rules in the same rule collection
group.
Next steps
Azure Firewall Policy rule sets
What is Azure Resource Manager?
8/4/2022 • 6 minutes to read • Edit Online
Azure Resource Manager is the deployment and management service for Azure. It provides a management layer
that enables you to create, update, and delete resources in your Azure account. You use management features,
like access control, locks, and tags, to secure and organize your resources after deployment.
To learn about Azure Resource Manager templates (ARM templates), see the ARM template overview. To learn
about Bicep, see Bicep overview.
All capabilities that are available in the portal are also available through PowerShell, Azure CLI, REST APIs, and
client SDKs. Functionality initially released through APIs will be represented in the portal within 180 days of
initial release.
Terminology
If you're new to Azure Resource Manager, there are some terms you might not be familiar with.
resource - A manageable item that is available through Azure. Virtual machines, storage accounts, web
apps, databases, and virtual networks are examples of resources. Resource groups, subscriptions,
management groups, and tags are also examples of resources.
resource group - A container that holds related resources for an Azure solution. The resource group
includes those resources that you want to manage as a group. You decide which resources belong in a
resource group based on what makes the most sense for your organization. See Resource groups.
resource provider - A service that supplies Azure resources. For example, a common resource provider is
Microsoft.Compute , which supplies the virtual machine resource. Microsoft.Storage is another common
resource provider. See Resource providers and types.
declarative syntax - Syntax that lets you state "Here's what I intend to create" without having to write the
sequence of programming commands to create it. ARM templates and Bicep files are examples of declarative
syntax. In those files, you define the properties for the infrastructure to deploy to Azure.
ARM template - A JavaScript Object Notation (JSON) file that defines one or more resources to deploy to a
resource group, subscription, management group, or tenant. The template can be used to deploy the
resources consistently and repeatedly. See Template deployment overview.
Bicep file - A file for declaratively deploying Azure resources. Bicep is a language that's been designed to
provide the best authoring experience for infrastructure as code solutions in Azure. See Bicep overview.
For more definitions of Azure terminology, see Azure fundamental concepts.
Understand scope
Azure provides four levels of scope: management groups, subscriptions, resource groups, and resources. The
following image shows an example of these layers.
You apply management settings at any of these levels of scope. The level you select determines how widely the
setting is applied. Lower levels inherit settings from higher levels. For example, when you apply a policy to the
subscription, the policy is applied to all resource groups and resources in your subscription. When you apply a
policy on the resource group, that policy is applied to the resource group and all its resources. However, another
resource group doesn't have that policy assignment.
For information about managing identities and access, see Azure Active Directory.
You can deploy templates to tenants, management groups, subscriptions, or resource groups.
Resource groups
There are some important factors to consider when defining your resource group:
All the resources in your resource group should share the same lifecycle. You deploy, update, and delete
them together. If one resource, such as a server, needs to exist on a different deployment cycle it should
be in another resource group.
Each resource can exist in only one resource group.
You can add or remove a resource to a resource group at any time.
You can move a resource from one resource group to another group. For more information, see Move
resources to new resource group or subscription.
The resources in a resource group can be located in different regions than the resource group.
When you create a resource group, you need to provide a ___location for that resource group.
You may be wondering, "Why does a resource group need a ___location? And, if the resources can have
different locations than the resource group, why does the resource group ___location matter at all?"
The resource group stores metadata about the resources. When you specify a ___location for the resource
group, you're specifying where that metadata is stored. For compliance reasons, you may need to ensure
that your data is stored in a particular region.
If a resource group's region is temporarily unavailable, you can't update resources in the resource group
because the metadata is unavailable. The resources in other regions will still function as expected, but you
can't update them. This condition doesn't apply to global resources like Azure Content Delivery Network,
Azure DNS, Azure Traffic Manager, and Azure Front Door.
For more information about building reliable applications, see Designing reliable Azure applications.
A resource group can be used to scope access control for administrative actions. To manage a resource
group, you can assign Azure Policies, Azure roles, or resource locks.
You can apply tags to a resource group. The resources in the resource group don't inherit those tags.
A resource can connect to resources in other resource groups. This scenario is common when the two
resources are related but don't share the same lifecycle. For example, you can have a web app that
connects to a database in a different resource group.
When you delete a resource group, all resources in the resource group are also deleted. For information
about how Azure Resource Manager orchestrates those deletions, see Azure Resource Manager resource
group and resource deletion.
You can deploy up to 800 instances of a resource type in each resource group. Some resource types are
exempt from the 800 instance limit. For more information, see resource group limits.
Some resources can exist outside of a resource group. These resources are deployed to the subscription,
management group, or tenant. Only specific resource types are supported at these scopes.
To create a resource group, you can use the portal, PowerShell, Azure CLI, or an ARM template.
Next steps
To learn about limits that are applied across Azure services, see Azure subscription and service limits,
quotas, and constraints.
To learn about moving resources, see Move resources to new resource group or subscription.
To learn about tagging resources, see Use tags to organize your Azure resources.
To learn about locking resources, see Lock resources to prevent unexpected changes.
Understand the structure and syntax of ARM
templates
8/4/2022 • 14 minutes to read • Edit Online
This article describes the structure of an Azure Resource Manager template (ARM template). It presents the
different sections of a template and the properties that are available in those sections.
This article is intended for users who have some familiarity with ARM templates. It provides detailed
information about the structure of the template. For a step-by-step tutorial that guides you through the process
of creating a template, see Tutorial: Create and deploy your first ARM template. To learn about ARM templates
through a guided set of modules on Microsoft Learn, see Deploy and manage resources in Azure by using ARM
templates.
TIP
Bicep is a new language that offers the same capabilities as ARM templates but with a syntax that's easier to use. If you're
considering infrastructure as code options, we recommend looking at Bicep.
To learn about the elements of a Bicep file, see Understand the structure and syntax of Bicep files.
Template format
In its simplest structure, a template has the following elements:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "",
"apiProfile": "",
"parameters": { },
"variables": { },
"functions": [ ],
"resources": [ ],
"outputs": { }
}
Each element has properties you can set. This article describes the sections of the template in greater detail.
Parameters
In the parameters section of the template, you specify which values you can input when deploying the
resources. You're limited to 256 parameters in a template. You can reduce the number of parameters by using
objects that contain multiple properties.
The available properties for a parameter are:
"parameters": {
"<parameter-name>" : {
"type" : "<type-of-parameter-value>",
"defaultValue": "<default-value-of-parameter>",
"allowedValues": [ "<array-of-allowed-values>" ],
"minValue": <minimum-value-for-int>,
"maxValue": <maximum-value-for-int>,
"minLength": <minimum-length-for-string-or-array>,
"maxLength": <maximum-length-for-string-or-array-parameters>,
"metadata": {
"description": "<description-of-the parameter>"
}
}
}
Variables
In the variables section, you construct values that can be used throughout your template. You don't need to
define variables, but they often simplify your template by reducing complex expressions. The format of each
variable matches one of the data types.
The following example shows the available options for defining a variable:
"variables": {
"<variable-name>": "<variable-value>",
"<variable-name>": {
<variable-complex-type-value>
},
"<variable-object-name>": {
"copy": [
{
"name": "<name-of-array-property>",
"count": <number-of-iterations>,
"input": <object-or-value-to-repeat>
}
]
},
"copy": [
{
"name": "<variable-array-name>",
"count": <number-of-iterations>,
"input": <object-or-value-to-repeat>
}
]
}
For information about using copy to create several values for a variable, see Variable iteration.
For examples of how to use variables, see Variables in ARM template.
In Bicep, see variables.
Functions
Within your template, you can create your own functions. These functions are available for use in your template.
Typically, you define complicated expressions that you don't want to repeat throughout your template. You
create the user-defined functions from expressions and functions that are supported in templates.
When defining a user function, there are some restrictions:
The function can't access variables.
The function can only use parameters that are defined in the function. When you use the parameters function
within a user-defined function, you're restricted to the parameters for that function.
The function can't call other user-defined functions.
The function can't use the reference function.
Parameters for the function can't have default values.
"functions": [
{
"namespace": "<namespace-for-functions>",
"members": {
"<function-name>": {
"parameters": [
{
"name": "<parameter-name>",
"type": "<type-of-parameter-value>"
}
],
"output": {
"type": "<type-of-output-value>",
"value": "<function-return-value>"
}
}
}
}
],
For examples of how to use custom functions, see User-defined functions in ARM template.
In Bicep, user-defined functions aren't supported. Bicep does support a variety of functions and operators.
Resources
In the resources section, you define the resources that are deployed or updated.
You define resources with the following structure:
"resources": [
{
"condition": "<true-to-deploy-this-resource>",
"type": "<resource-provider-namespace/resource-type-name>",
"apiVersion": "<api-version-of-resource>",
"name": "<name-of-the-resource>",
"comments": "<your-reference-notes>",
"___location": "<___location-of-resource>",
"dependsOn": [
"<array-of-related-resource-names>"
],
"tags": {
"<tag-name1>": "<tag-value1>",
"<tag-name2>": "<tag-value2>"
},
"identity": {
"type": "<system-assigned-or-user-assigned-identity>",
"userAssignedIdentities": {
"<resource-id-of-identity>": {}
}
},
"sku": {
"name": "<sku-name>",
"tier": "<sku-tier>",
"size": "<sku-size>",
"family": "<sku-family>",
"capacity": <sku-capacity>
},
"kind": "<type-of-resource>",
"scope": "<target-scope-for-extension-resources>",
"copy": {
"name": "<name-of-copy-loop>",
"count": <number-of-iterations>,
"mode": "<serial-or-parallel>",
"batchSize": <number-to-deploy-serially>
},
"plan": {
"name": "<plan-name>",
"promotionCode": "<plan-promotion-code>",
"publisher": "<plan-publisher>",
"product": "<plan-product>",
"version": "<plan-version>"
},
"properties": {
"<settings-for-the-resource>",
"copy": [
{
"name": ,
"count": ,
"input": {}
}
]
},
"resources": [
"<array-of-child-resources>"
]
}
]
Outputs
In the outputs section, you specify values that are returned from deployment. Typically, you return values from
resources that were deployed.
The following example shows the structure of an output definition:
"outputs": {
"<output-name>": {
"condition": "<boolean-value-whether-to-output-value>",
"type": "<type-of-output-value>",
"value": "<output-value-expression>",
"copy": {
"count": <number-of-iterations>,
"input": <values-for-the-variable>
}
}
}
NOTE
When using Azure CLI to deploy templates with comments, use version 2.3.0 or later, and specify the
--handle-extended-json-format switch.
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2018-10-01",
"name": "[variables('vmName')]", // to customize name, change it in variables
"___location": "[parameters('___location')]", //defaults to resource group ___location
"dependsOn": [ /* storage account and network interface must be deployed first */
"[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
],
In Visual Studio Code, the Azure Resource Manager Tools extension can automatically detect an ARM template
and change the language mode. If you see Azure Resource Manager Template at the bottom-right corner of
Visual Studio Code, you can use the inline comments. The inline comments are no longer marked as invalid.
You can add a metadata object almost anywhere in your template. Resource Manager ignores the object, but
your JSON editor may warn you that the property isn't valid. In the object, define the properties you need.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"comments": "This template was developed for demonstration purposes.",
"author": "Example Name"
},
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "User name for the Virtual Machine."
}
},
When deploying the template through the portal, the text you provide in the description is automatically used as
a tip for that parameter.
For resources , add a comments element or a metadata object. The following example shows both a comments
element and a metadata object.
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2018-07-01",
"name": "[concat('storage', uniqueString(resourceGroup().id))]",
"comments": "Storage account used to store VM disks",
"___location": "[parameters('___location')]",
"metadata": {
"comments": "These tags are needed for policy compliance."
},
"tags": {
"Dept": "[parameters('deptName')]",
"Environment": "[parameters('environment')]"
},
"sku": {
"name": "Standard_LRS"
},
"kind": "Storage",
"properties": {}
}
]
"outputs": {
"hostname": {
"type": "string",
"value": "[reference(variables('publicIPAddressName')).dnsSettings.fqdn]",
"metadata": {
"comments": "Return the fully qualified ___domain name"
}
},
Multi-line strings
You can break a string into multiple lines. For example, see the ___location property and one of the comments in
the following JSON example.
NOTE
To deploy templates with multi-line strings, use Azure PowerShell or Azure CLI. For CLI, use version 2.3.0 or later, and
specify the --handle-extended-json-format switch.
Multi-line strings aren't supported when you deploy the template through the Azure portal, a DevOps pipeline, or the
REST API.
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2018-10-01",
"name": "[variables('vmName')]", // to customize name, change it in variables
"___location": "[
parameters('___location')
]", //defaults to resource group ___location
/*
storage account and network interface
must be deployed first
*/
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
"[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
],
In Bicep, see multi-line strings.
Next steps
To view complete templates for many different types of solutions, see the Azure Quickstart Templates.
For details about the functions you can use from within a template, see ARM template functions.
To combine several templates during deployment, see Using linked and nested templates when deploying
Azure resources.
For recommendations about creating templates, see ARM template best practices.
For answers to common questions, see Frequently asked questions about ARM templates.