You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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.
12
12
---
13
13
14
14
# Tutorial: Create an application gateway with a Web Application Firewall using the Azure portal
15
15
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.
17
17
18
18
In this tutorial, you learn how to:
19
19
@@ -144,18 +144,20 @@ In this example, you'll use virtual machines as the target backend. You can eith
144
144
145
145
To do this, you'll:
146
146
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.
149
149
3. Add the backend servers to the backend pool.
150
150
151
151
### Create a virtual machine
152
152
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**.
155
155
3. Enter these values in the **Basics** tab for the following virtual machine settings:
156
156
157
157
-**Resource group**: Select **myResourceGroupAG** for the resource group name.
158
158
-**Virtual machine name**: Enter *myVM* for the name of the virtual machine.
159
+
-**Image**: Ubuntu Server 20.04 LTS - Gen2.
160
+
-**Authentication type**: Password
159
161
-**Username**: Enter a name for the administrator username.
160
162
-**Password**: Enter a password for the administrator password.
161
163
-**Public inbound ports**: Select **None**.
@@ -168,31 +170,27 @@ To do this, you'll:
168
170
1. On the **Review + create** tab, review the settings, correct any validation errors, and then select **Create**.
169
171
1. Wait for the virtual machine creation to complete before continuing.
170
172
171
-
### Install IIS for testing
173
+
### Install NGINX for testing
172
174
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.
174
176
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.
176
178
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.":::
178
180
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:
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.
196
194
197
195
### Add backend servers to backend pool
198
196
@@ -216,7 +214,7 @@ In this example, you install IIS on the virtual machines only to verify Azure cr
216
214
217
215
## Test the application gateway
218
216
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:
220
218
221
219
1. Find the public IP address for the application gateway on its **Overview** page.
222
220
:::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.":::
0 commit comments