|
| 1 | +--- |
| 2 | +title: Azure Firewall SNAT private IP address ranges |
| 3 | +description: You can configure IP address private ranges so the firewall won't SNAT traffic to those IP addresses. |
| 4 | +services: firewall |
| 5 | +author: vhorne |
| 6 | +ms.service: firewall |
| 7 | +ms.topic: article |
| 8 | +ms.date: 01/09/2020 |
| 9 | +ms.author: victorh |
| 10 | +--- |
| 11 | + |
| 12 | +# Azure Firewall SNAT private IP address ranges |
| 13 | + |
| 14 | +Azure Firewall doesn’t SNAT when the destination IP address is in a private IP address range per [IANA RFC 1918](https://tools.ietf.org/html/rfc1918). |
| 15 | + |
| 16 | +If your organization uses a public IP address range for private networks, Azure Firewall will SNAT 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. |
| 17 | + |
| 18 | +## Configure SNAT private IP address ranges |
| 19 | + |
| 20 | +You can use Azure PowerShell to specify an IP address range that the firewall won't SNAT. |
| 21 | + |
| 22 | +### New firewall |
| 23 | + |
| 24 | +For a new firewall, the Azure PowerShell command is: |
| 25 | + |
| 26 | +`New-AzFirewall -Name $GatewayName -ResourceGroupName $RG -Location $Location -VirtualNetworkName $vnet.Name -PublicIpName $LBPip.Name -PrivateRange @("IANAPrivateRanges","IPRange1", "IPRange2")` |
| 27 | + |
| 28 | +> [!NOTE] |
| 29 | +> IANAPrivateRanges is expanded to the current defaults on Azure Firewall while the other ranges are added to it. |
| 30 | +
|
| 31 | +For more information, see [New-AzFirewall](https://docs.microsoft.com/powershell/module/az.network/new-azfirewall?view=azps-3.3.0). |
| 32 | + |
| 33 | +### Existing firewall |
| 34 | + |
| 35 | +To configure an existing firewall, use the following Azure PowerShell commands: |
| 36 | + |
| 37 | +```azurepowershell |
| 38 | +$azfw = Get-AzFirewall -ResourceGroupName "Firewall Resource Group name" |
| 39 | +$azfw.PrivateRange = @(“IANAPrivateRanges”,“IPRange1”, “IPRange2”) |
| 40 | +Set-AzFirewall -AzureFirewall $azfw |
| 41 | +``` |
| 42 | + |
| 43 | +### Templates |
| 44 | + |
| 45 | +You can add the following to the `additionalProperties` section: |
| 46 | + |
| 47 | +``` |
| 48 | +"additionalProperties": { |
| 49 | + "Network.SNAT.PrivateRanges": "IANAPrivateRanges , IPRange1, IPRange2" |
| 50 | + }, |
| 51 | +``` |
| 52 | + |
| 53 | +## Next steps |
| 54 | + |
| 55 | +- Learn how to [deploy and configure an Azure Firewall](tutorial-firewall-deploy-portal.md). |
0 commit comments