Skip to content

Commit 180b9d4

Browse files
Merge pull request #217846 from vhorne/waf-ag-portal
change backend to Linux
2 parents 30065c1 + e1f42a9 commit 180b9d4

File tree

2 files changed

+24
-26
lines changed

2 files changed

+24
-26
lines changed

articles/web-application-firewall/ag/application-gateway-web-application-firewall-portal.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ services: web-application-firewall
55
author: vhorne
66
ms.service: web-application-firewall
77
ms.topic: tutorial
8-
ms.date: 10/28/2022
8+
ms.date: 11/10/2022
99
ms.author: victorh
1010
ms.custom: template-tutorial, engagement-fy23
1111
#Customer intent: As an IT administrator, I want to use the Azure portal to set up an application gateway with Web Application Firewall so I can protect my applications.
1212
---
1313

1414
# Tutorial: Create an application gateway with a Web Application Firewall using the Azure portal
1515

16-
This tutorial shows you how to use the Azure portal to create an Application Gateway with a Web Application Firewall (WAF). The WAF uses [OWASP](https://owasp.org/www-project-modsecurity-core-rule-set/) rules to protect your application. These rules include protection against attacks such as SQL injection, cross-site scripting attacks, and session hijacks. After creating the application gateway, you test it to make sure it's working correctly. With Azure Application Gateway, you direct your application web traffic to specific resources by assigning listeners to ports, creating rules, and adding resources to a backend pool. For the sake of simplicity, this tutorial uses a simple setup with a public front-end IP, a basic listener to host a single site on this application gateway, two virtual machines used for the backend pool, and a basic request routing rule.
16+
This tutorial shows you how to use the Azure portal to create an Application Gateway with a Web Application Firewall (WAF). The WAF uses [OWASP](https://owasp.org/www-project-modsecurity-core-rule-set/) rules to protect your application. These rules include protection against attacks such as SQL injection, cross-site scripting attacks, and session hijacks. After creating the application gateway, you test it to make sure it's working correctly. With Azure Application Gateway, you direct your application web traffic to specific resources by assigning listeners to ports, creating rules, and adding resources to a backend pool. For the sake of simplicity, this tutorial uses a simple setup with a public front-end IP, a basic listener to host a single site on this application gateway, two Linux virtual machines used for the backend pool, and a basic request routing rule.
1717

1818
In this tutorial, you learn how to:
1919

@@ -144,18 +144,20 @@ In this example, you'll use virtual machines as the target backend. You can eith
144144

145145
To do this, you'll:
146146

147-
1. Create two new VMs, *myVM* and *myVM2*, to be used as backend servers.
148-
2. Install IIS on the virtual machines to verify that the application gateway was created successfully.
147+
1. Create two new Linux VMs, *myVM* and *myVM2*, to be used as backend servers.
148+
2. Install NGINX on the virtual machines to verify that the application gateway was created successfully.
149149
3. Add the backend servers to the backend pool.
150150

151151
### Create a virtual machine
152152

153-
1. On the Azure portal, select **Create a resource**. The **New** window appears.
154-
2. Select **Windows Server 2019 Datacenter** in the **Popular** list. The **Create a virtual machine** page appears.<br>Application Gateway can route traffic to any type of virtual machine used in its backend pool. In this example, you use a Windows Server 2019 Datacenter.
153+
1. On the Azure portal, select **Create a resource**. The **Create a resource** window appears.
154+
2. Under **Virtual machine**, select **Create**.
155155
3. Enter these values in the **Basics** tab for the following virtual machine settings:
156156

157157
- **Resource group**: Select **myResourceGroupAG** for the resource group name.
158158
- **Virtual machine name**: Enter *myVM* for the name of the virtual machine.
159+
- **Image**: Ubuntu Server 20.04 LTS - Gen2.
160+
- **Authentication type**: Password
159161
- **Username**: Enter a name for the administrator username.
160162
- **Password**: Enter a password for the administrator password.
161163
- **Public inbound ports**: Select **None**.
@@ -168,31 +170,27 @@ To do this, you'll:
168170
1. On the **Review + create** tab, review the settings, correct any validation errors, and then select **Create**.
169171
1. Wait for the virtual machine creation to complete before continuing.
170172

171-
### Install IIS for testing
173+
### Install NGINX for testing
172174

173-
In this example, you install IIS on the virtual machines only to verify Azure created the application gateway successfully.
175+
In this example, you install NGINX on the virtual machines only to verify Azure created the application gateway successfully.
174176

175-
1. Open [Azure PowerShell](../../cloud-shell/quickstart-powershell.md). To do so, select **Cloud Shell** from the top navigation bar of the Azure portal and then select **PowerShell** from the drop-down list.
177+
1. Open a Bash Cloud Shell. To do so, select the **Cloud Shell** icon from the top navigation bar of the Azure portal and then select **Bash** from the drop-down list.
176178

177-
:::image type="content" source="../media/application-gateway-web-application-firewall-portal/application-gateway-extension.png" alt-text="Screenshot of accessing PowerShell from Portal Cloud shell.":::
179+
:::image type="content" source="../media/application-gateway-web-application-firewall-portal/bash-shell.png" alt-text="Screenshot showing the Bash Cloud Shell.":::
178180

179-
2. Set the location parameter for your environment, and then run the following command to install IIS on the virtual machine:
181+
2. Run the following command to install NGINX on the virtual machine:
180182

181-
```azurepowershell-interactive
182-
$location = 'east us'
183+
```azurecli-interactive
184+
az vm extension set \
185+
--publisher Microsoft.Azure.Extensions \
186+
--version 2.0 \
187+
--name CustomScript \
188+
--resource-group myResourceGroupAG \
189+
--vm-name myVM \
190+
--settings '{ "fileUris": ["https://raw.githubusercontent.com/Azure/azure-docs-powershell-samples/master/application-gateway/iis/install_nginx.sh"], "commandToExecute": "./install_nginx.sh" }'
191+
```
183192

184-
Set-AzVMExtension `
185-
-ResourceGroupName myResourceGroupAG `
186-
-ExtensionName IIS `
187-
-VMName myVM `
188-
-Publisher Microsoft.Compute `
189-
-ExtensionType CustomScriptExtension `
190-
-TypeHandlerVersion 1.4 `
191-
-SettingString '{"commandToExecute":"powershell Add-WindowsFeature Web-Server; powershell Add-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\" -Value $($env:computername)"}' `
192-
-Location $location
193-
```
194-
195-
3. Create a second virtual machine and install IIS by using the steps that you previously completed. Use *myVM2* for the virtual machine name and for the **VMName** setting of the **Set-AzVMExtension** cmdlet.
193+
3. Create a second virtual machine and install NGINX using these steps that you previously completed. Use *myVM2* for the virtual machine name and for the **--vm-name** setting of the cmdlet.
196194

197195
### Add backend servers to backend pool
198196

@@ -216,7 +214,7 @@ In this example, you install IIS on the virtual machines only to verify Azure cr
216214

217215
## Test the application gateway
218216

219-
Although IIS isn't required to create the application gateway, you installed it to verify whether Azure successfully created the application gateway. Use IIS to test the application gateway:
217+
Although NGINX isn't required to create the application gateway, you installed it to verify whether Azure successfully created the application gateway. Use the web service to test the application gateway:
220218

221219
1. Find the public IP address for the application gateway on its **Overview** page.
222220
:::image type="content" source="../media/application-gateway-web-application-firewall-portal/application-gateway-record-ag-address.png" alt-text="Screenshot of Application Gateway public IP address on the Overview page.":::
146 KB
Loading

0 commit comments

Comments
 (0)