Skip to content

Commit d2a2db8

Browse files
committed
[Azure Firewall multiple IPS] - Bicep quickstart
1 parent 0386f7c commit d2a2db8

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: 'Quickstart: Create an Azure Firewall with multiple public IP addresses - Bicep'
3+
description: In this quickstart, you learn how to use a Bicep file to create an Azure Firewall with multiple public IP addresses.
4+
services: firewall
5+
ms.service: firewall
6+
ms.topic: quickstart
7+
ms.custom: subject-armqs, devx-track-azurepowershell, mode-arm
8+
ms.date: 08/11/2022
9+
---
10+
11+
# Quickstart: Create an Azure Firewall with multiple public IP addresses - Bicep
12+
13+
In this quickstart, you use a Bicep file 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.
14+
15+
[!INCLUDE [About Bicep](../../includes/resource-manager-quickstart-bicep-introduction.md)]
16+
17+
For more information about Azure Firewall with multiple public IP addresses, see [Deploy an Azure Firewall with multiple public IP addresses using Azure PowerShell](deploy-multi-public-ip-powershell.md).
18+
19+
## Prerequisites
20+
21+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22+
23+
## Review the Bicep file
24+
25+
This Bicep file creates an Azure Firewall with two public IP addresses, along with the necessary resources to support the Azure Firewall.
26+
27+
The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/fw-docs-qs).
28+
29+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.network/fw-docs-qs/main.bicep":::
30+
31+
Multiple Azure resources are defined in the template:
32+
33+
- [**Microsoft.Network/networkSecurityGroups**](/azure/templates/microsoft.network/networksecuritygroups)
34+
- [**Microsoft.Network/publicIPPrefix**](/azure/templates/microsoft.network/publicipprefixes)
35+
- [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses)
36+
- [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualnetworks)
37+
- [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualmachines)
38+
- [**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageAccounts)
39+
- [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkinterfaces)
40+
- [**Microsoft.Network/azureFirewalls**](/azure/templates/microsoft.network/azureFirewalls)
41+
- [**Microsoft.Network/routeTables**](/azure/templates/microsoft.network/routeTables)
42+
43+
## Deploy the Bicep file
44+
45+
1. Save the Bicep file as **main.bicep** to your local computer.
46+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
47+
48+
# [CLI](#tab/CLI)
49+
50+
```azurecli
51+
az group create --name exampleRG --location eastus
52+
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters adminUsername=<admin-username>
53+
```
54+
55+
# [PowerShell](#tab/PowerShell)
56+
57+
```azurepowershell
58+
New-AzResourceGroup -Name exampleRG -Location eastus
59+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -adminUsername "<admin-username>"
60+
```
61+
62+
---
63+
64+
> [!NOTE]
65+
> Replace **\<admin-username\>** with the admin username for the backend server.
66+
67+
You will be prompt to enter the admin password.
68+
69+
When the deployment finishes, you should see a message indicating the deployment succeeded.
70+
71+
72+
## Validate the deployment
73+
74+
In the Azure portal, review the deployed resources. Note the firewall public IP addresses.
75+
76+
Use Remote Desktop Connection to connect to the firewall public IP addresses. Successful connections demonstrates firewall NAT rules that allow the connection to the backend servers.
77+
78+
## Clean up resources
79+
80+
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.
81+
82+
To delete the resource group, call the `Remove-AzResourceGroup` cmdlet:
83+
84+
```azurepowershell-interactive
85+
Remove-AzResourceGroup -Name "exampleRG"
86+
```
87+
88+
## Next steps
89+
90+
> [!div class="nextstepaction"]
91+
> [Tutorial: Deploy and configure Azure Firewall in a hybrid network using the Azure portal](tutorial-hybrid-portal.md)

articles/firewall/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ items:
1313
- name: Deploy with IP Groups - ARM template
1414
displayName: Resource Manager
1515
href: quick-create-ipgroup-template.md
16+
- name: Deploy with multiple addresses - Bicep
17+
displayName: Resource Manager,ARM,template
18+
href: quick-create-multiple-ip-bicep.md
1619
- name: Deploy with multiple addresses - ARM template
1720
displayName: Resource Manager
1821
href: quick-create-multiple-ip-template.md

0 commit comments

Comments
 (0)