Skip to content

Commit 8072454

Browse files
authored
Merge pull request #4 from vhorne/57313
Edit pilot
2 parents 9f8355d + f9910c0 commit 8072454

File tree

1 file changed

+30
-21
lines changed

1 file changed

+30
-21
lines changed

articles/firewall/tutorial-hybrid-ps.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,40 @@ ms.service: firewall
77
ms.topic: tutorial
88
ms.date: 10/27/2018
99
ms.author: victorh
10-
#Customer intent: As an administrator, I want to deploy and configure Azure Firewall in a hybrid network so that I can control access from an on-premises network to an Azure virtual network.
10+
#Customer intent: As an administrator, I want to control network access from an on-premises network to an Azure virtual network.
1111
---
1212
# Tutorial: Deploy and configure Azure Firewall in a hybrid network using Azure PowerShell
1313

14-
In this tutorial, you learn how to:
14+
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.
1515

16-
> [!div class="checklist"]
17-
> * Set up the network environment
18-
> * Configure and deploy the firewall
19-
> * Create the routes
20-
> * Create the virtual machines
21-
> * Test the firewall
16+
You can use Azure Firewall to control network access in a hybrid network using rules that define allowed and denied network traffic.
2217

2318
For this tutorial, you create three virtual networks:
19+
2420
- **VNet-Hub** - the firewall is in this virtual network.
2521
- **VNet-Spoke** - the spoke virtual network represents the workload located on Azure.
2622
- **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 Express Route connection. For simplicity, this tutorial uses a VPN gateway connection, and an Azure-located virtual network is used to represent an on-premises network.
2723

2824
![Firewall in a hybrid network](media/tutorial-hybrid-ps/hybrid-network-firewall.png)
2925

26+
In this tutorial, you learn how to:
27+
28+
> [!div class="checklist"]
29+
> * Declare the variables
30+
> * Create the firewall hub virtual network
31+
> * Create the spoke virtual network
32+
> * Create the on-premises virtual network
33+
> * Configure and deploy the firewall
34+
> * Create and connect the VPN gateways
35+
> * Peer the hub and spoke virtual networks
36+
> * Create the routes
37+
> * Create the virtual machines
38+
> * Test the firewall
39+
3040
## Prerequisites
3141

42+
This tutorial requires that you run PowerShell locally. You must have Azure PowerShell module version 6.12.0 or later installed. Run `Get-Module -ListAvailable AzureRM` to find the version. If you need to upgrade, see [Install Azure PowerShell module](https://docs.microsoft.com/powershell/azure/install-azurerm-ps). After you verify the PowerShell version, run `Login-AzureRmAccount` to create a connection with Azure.
43+
3244
There are three key requirements for this scenario to work correctly:
3345

3446
- A User Defined Route on the spoke subnet that points to the Azure Firewall IP address as the default gateway. BGP route propagation must be **Disabled** on this route table.
@@ -40,11 +52,9 @@ See the [Create Routes](#create-routes) section in this tutorial to see how thes
4052

4153
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
4254

43-
[!INCLUDE [cloud-shell-powershell.md](../../includes/cloud-shell-powershell.md)]
44-
4555
## Declare the variables
4656

47-
The following example declares the variables using the values for this tutorial. In most cases, you should replace the values with your own. However, you can use these variables if you are running through the steps to become familiar with this type of configuration. Modify the variables if needed, then copy and paste them into your PowerShell console.
57+
The following example declares the variables using the values for this tutorial. In some cases, you might need to replace some values with your own to work in your subscription. Modify the variables if needed, then copy and paste them into your PowerShell console.
4858

4959
```azurepowershell
5060
$RG1 = "FW-Hybrid-Test"
@@ -85,16 +95,15 @@ $GWOnprempipName = "VNet-Onprem-GW-pip"
8595
$SNnameGW = "GatewaySubnet"
8696
```
8797

88-
## Create a resource group
8998

90-
Create a resource group to contain all the resources required for this tutorial:
99+
## Create the firewall hub virtual network
100+
101+
First, create the resource group to contain the resources for this tutorial:
91102

92103
```azurepowershell
93104
New-AzureRmResourceGroup -Name $RG1 -Location $Location1
94105
```
95106

96-
## Create and configure the firewall hub virtual network
97-
98107
Define the subnets to be included in the virtual network:
99108

100109
```azurepowershell
@@ -116,7 +125,7 @@ Request a public IP address to be allocated to the VPN gateway you will create f
116125
-Location $Location1 -AllocationMethod Dynamic
117126
```
118127

119-
## Create and configure the spoke virtual network
128+
## Create the spoke virtual network
120129

121130
Define the subnets to be included in the spoke virtual network:
122131

@@ -132,7 +141,7 @@ $VNetSpoke = New-AzureRmVirtualNetwork -Name $VnetNameSpoke -ResourceGroupName $
132141
-Location $Location1 -AddressPrefix $VNetSpokePrefix -Subnet $Spokesub,$GWsubSpoke
133142
```
134143

135-
## Create and configure the on-premises virtual network
144+
## Create the on-premises virtual network
136145

137146
Define the subnets to be included in the virtual network:
138147

@@ -290,15 +299,15 @@ Add-AzureRmVirtualNetworkPeering -Name HubtoSpoke -VirtualNetwork $VNetHub -Remo
290299
Add-AzureRmVirtualNetworkPeering -Name SpoketoHub -VirtualNetwork $VNetSpoke -RemoteVirtualNetworkId $VNetHub.Id -AllowForwardedTraffic -UseRemoteGateways
291300
```
292301

293-
## Create routes
302+
## Create the routes
294303

295304
Next, create a couple routes:
296305

297306
- A route from the hub gateway subnet to the spoke subnet through the firewall IP address
298307
- A default route from the spoke subnet through the firewall IP address
299308

300309
> [!NOTE]
301-
> Azure Firewall learns your on-premises networks using BGP. This may include a default route, which will route Internet traffic back through your on-premises network. If instead you want Internet traffic to be sent directly from the firewall to the Internet, add a user-defined default route (0.0.0.0/0) on the AzureFirewallSubnet with next hop type **Internet**. Your on-premises destined traffic is still forced-tunneled through the VPN/ExpressRoute gateway using the more specific routes learned from BGP.
310+
> Azure Firewall learns your on-premises networks using BGP. This may include a default route, which routes Internet traffic back through your on-premises network. In a production deployment, you might want Internet traffic to be sent directly from the firewall to the Internet. You could add a user-defined default route (0.0.0.0/0) on the AzureFirewallSubnet with next hop type **Internet**. Your on-premises destined traffic is still forced-tunneled through the VPN/ExpressRoute gateway using the more specific routes learned from BGP.
302311
303312
```azurepowershell
304313
#Create a route table
@@ -413,7 +422,7 @@ Set-AzureRmVMExtension `
413422

414423
### Create the on-premises virtual machine
415424

416-
This is a simple virtual machine that you can connect to using Remote Desktop to the public IP address. From there, you can then connect to the on-premises server through the firewall. When prompted, type a user name and password for the virtual machine.
425+
This is a simple virtual machine that you use to connect using Remote Desktop to the public IP address. From there, you then connect to the on-premises server through the firewall. When prompted, type a user name and password for the virtual machine.
417426

418427
```azurepowershell
419428
New-AzureRmVm `
@@ -428,7 +437,7 @@ New-AzureRmVm `
428437

429438
## Test the firewall
430439

431-
First, get and note the private IP address for **VM-spoke-01** virtual machine.
440+
First, get and then note the private IP address for **VM-spoke-01** virtual machine.
432441

433442
```azurepowershell
434443
$NIC.IpConfigurations.privateipaddress

0 commit comments

Comments
 (0)