{
    "id": "2b01ea04-0a0a-4f9f-bf79-14330a7d40f8",
    "name": "Provision Azure Firewall",
    "slug": "provision-azure-firewall",
    "status": "published",
    "lab_type": "azure",
    "is_sample": false,
    "duration_in_seconds": 1200,
    "metadata": {},
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2020-08-11T12:14:12.586963Z",
    "modified": "2023-10-03T18:57:44.372478Z",
    "is_beta": false,
    "lab_objectives": [],
    "main_learning_area": null,
    "learning_areas": [],
    "categories": [],
    "tags": [],
    "difficulty": null,
    "is_web_access": false,
    "is_lab_experience": false,
    "is_featured": false,
    "cve": null,
    "severity": null,
    "year": null,
    "classification": null,
    "is_trackable": false,
    "cpe_credits": null,
    "is_skill_check": false,
    "external_url": "https://portal.azure.com/",
    "solution_video": "751b9147-b527-4527-abfd-639db8ebbbeb",
    "explanation_video": null,
    "description": "# Task: Provision Azure Firewall\n\n## Video: Provision Azure Firewall\n\n**Estimated time:** 20 minutes\n\n## Goal\n\nIn this task you will provision an Azure firewall and configure it to protect a load balanced web application.  You will configure rules that route traffic on port 80 to a load balancer and provide port mapping for ssh traffic to two virtual machines.\n\n## Pre-requisites\n\n1. Non-production Azure subscription\n2. Two virtual machines with web apps in a single virtual network\n\n*Note: See pre-requisite setup for the deployment of all necessary resources.*\n\n## Requirements\n\n1. Provision an Azure firewall\n2. Configure an Azure firewall\n3. Verify the firewall\n\n---\n\n## Pre-requisite set-up\n\nThis task requires several Azure resources.  To deploy the resources required for this task, run the following from a bash cloud shell:\n\n```bash\ncurl https://inedemoassets.blob.core.windows.net/taskfiles/azure_admin/scripts/deploy-3672T140-pre.sh | sh\n```\n\nThis script provisions the following resources:\n\n|Resource|Name|\n|---|---|\n|Resource group|**task-fwall-rg**|\n|Virtual Network|**firewall-vnet**|\n|Virtual machine|**firewall-web1-vm**|\n|Virtual machine|**firewall-web2-vm**|\n|Network security group|**firewall-nsg**|\n|Load balancer|**firewall-lb**|\n\n*Support resources are not shown.*\n\nThe network diagram is as follows:\n\n![Network diagram](./images/firewall-diagram.png)\n\n## Requirement 1: Provision an Azure firewall\n\nTo begin this task, you will provision an Azure firewall. To begin with, you will add a subnet named AzureFirewallSubnet to the firewall-vnet virtual network.  Then you will provision an Azure firewall associated with the firewall-vnet virtual network.  To complete this requirement:\n\n- Add a subnet to the firewall-vnet virtual network with the following settings:\n\n  |Setting|Value|\n  |---|---|\n  |Subnet name|**AzureFirewallSubnet**|\n  |IP Address range|**10.2.100.0/24**|\n\n- Provision an Azure firewall with the following settings:\n  \n  |Setting|Value|\n  |---|---|\n  |Resource group|**task-fwall-rg**|\n  |Name|**task-firewall**|\n  |Location|**East US**|\n  |Virtual network|**Use existing**|\n  |Virtual network name|**firewall-vnet**|\n  |Public IP address|**&lt;new&gt;**|\n  |Public IP name|**firewall-pip**|\n\n## Requirement 2: Configure an Azure firewall\n\nTo complete this requirement you will add NAT rules to the firewall to allow web traffic and SSH traffic from the public internet.  The web traffic will be over port 80 and will be directed to port 80 on the firewall-lb load balancer.  SSH traffic will be to ports 50001 and 50002 and will map to port 22 on the virtual machines.  To complete this requirement:\n\n- Record the following IP addresses:\n  - Firewall public IPv4 address\n  - load balancer front end IPv4 address\n  - firewall-web1-vm private IPv4 address\n  - firewall-web2-vm private IPv4 address\n- Add a NAT rule collection named **primary** to the **task-firewall** firewall. Use the following settings:\n\n  |Setting|Value|\n  |---|---|\n  |Rule collection|**primary**|\n  |Priority|**100**|\n  |**Rule1**||\n  |Name|**http**|\n  |Protocol|**TCP**|\n  |Source type|**IP address**|\n  |Source|**&ast;**|\n  |Destination address|**&lt;firewall public ip&gt;**|\n  |Destination ports|**80**|\n  |Translated address|**&lt;load balancer front end IP&gt;**|\n  |Translated ports|**80**|\n  |**Rule2**||\n  |Name|**ssh1**|\n  |Protocol|**TCP**|\n  |Source type|**IP address**|\n  |Source|**&ast;**|\n  |Destination address|**&lt;firewall public ip&gt;**|\n  |Destination ports|**50001**|\n  |Translated address|**&lt;firewall-web1-vm IP&gt;**|\n  |Translated ports|**22**|\n  |**Rule3**||\n  |Name|**ssh2**|\n  |Protocol|**TCP**|\n  |Source type|**IP address**|\n  |Source|**&ast;**|\n  |Destination address|**&lt;firewall public ip&gt;**|\n  |Destination ports|**50002**|\n  |Translated address|**&lt;firewall-web2-vm IP&gt;**|\n  |Translated ports|**22**|\n  \n## Requirement 3:Verify the firewall\n\nTo complete this task you will validate that HTTP traffic and ssh traffic are being properly routed through the firewall.  First, open a browser window and navigate to the public IP address of the firewall.  You should return the name of the server that handled the request.  Next, open an Azure cloud shell and enter the following command:\n\n```bash\nssh student@<public ip address of your firewall>:50001\n```\n\nEnter yes when prompted and enter the password: **Pa55w.rd!**.  You should end up at the shell prompt for the firewall-web1-vm virtual machine.\n\n## Clean up\n\n- Delete the **task-fwall-rg** resource group.\n\n## Solution\n\nHaving trouble completing this task?  View the demonstration video to see how to do it.",
    "description_html": "<h1>Task: Provision Azure Firewall</h1>\n<h2>Video: Provision Azure Firewall</h2>\n<p><strong>Estimated time:</strong> 20 minutes</p>\n<h2>Goal</h2>\n<p>In this task you will provision an Azure firewall and configure it to protect a load balanced web application.  You will configure rules that route traffic on port 80 to a load balancer and provide port mapping for ssh traffic to two virtual machines.</p>\n<h2>Pre-requisites</h2>\n<ol>\n<li>Non-production Azure subscription</li>\n<li>Two virtual machines with web apps in a single virtual network</li>\n</ol>\n<p><em>Note: See pre-requisite setup for the deployment of all necessary resources.</em></p>\n<h2>Requirements</h2>\n<ol>\n<li>Provision an Azure firewall</li>\n<li>Configure an Azure firewall</li>\n<li>Verify the firewall</li>\n</ol>\n<hr />\n<h2>Pre-requisite set-up</h2>\n<p>This task requires several Azure resources.  To deploy the resources required for this task, run the following from a bash cloud shell:</p>\n<pre class=\"codehilite\"><code class=\"language-bash\">curl https://inedemoassets.blob.core.windows.net/taskfiles/azure_admin/scripts/deploy-3672T140-pre.sh | sh</code></pre>\n\n<p>This script provisions the following resources:</p>\n<table>\n<thead>\n<tr>\n<th>Resource</th>\n<th>Name</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Resource group</td>\n<td><strong>task-fwall-rg</strong></td>\n</tr>\n<tr>\n<td>Virtual Network</td>\n<td><strong>firewall-vnet</strong></td>\n</tr>\n<tr>\n<td>Virtual machine</td>\n<td><strong>firewall-web1-vm</strong></td>\n</tr>\n<tr>\n<td>Virtual machine</td>\n<td><strong>firewall-web2-vm</strong></td>\n</tr>\n<tr>\n<td>Network security group</td>\n<td><strong>firewall-nsg</strong></td>\n</tr>\n<tr>\n<td>Load balancer</td>\n<td><strong>firewall-lb</strong></td>\n</tr>\n</tbody>\n</table>\n<p><em>Support resources are not shown.</em></p>\n<p>The network diagram is as follows:</p>\n<p><img alt=\"Network diagram\" src=\"./images/firewall-diagram.png\" /></p>\n<h2>Requirement 1: Provision an Azure firewall</h2>\n<p>To begin this task, you will provision an Azure firewall. To begin with, you will add a subnet named AzureFirewallSubnet to the firewall-vnet virtual network.  Then you will provision an Azure firewall associated with the firewall-vnet virtual network.  To complete this requirement:</p>\n<ul>\n<li>Add a subnet to the firewall-vnet virtual network with the following settings:</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Subnet name</td>\n<td><strong>AzureFirewallSubnet</strong></td>\n</tr>\n<tr>\n<td>IP Address range</td>\n<td><strong>10.2.100.0/24</strong></td>\n</tr>\n</tbody>\n</table>\n<ul>\n<li>Provision an Azure firewall with the following settings:</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Resource group</td>\n<td><strong>task-fwall-rg</strong></td>\n</tr>\n<tr>\n<td>Name</td>\n<td><strong>task-firewall</strong></td>\n</tr>\n<tr>\n<td>Location</td>\n<td><strong>East US</strong></td>\n</tr>\n<tr>\n<td>Virtual network</td>\n<td><strong>Use existing</strong></td>\n</tr>\n<tr>\n<td>Virtual network name</td>\n<td><strong>firewall-vnet</strong></td>\n</tr>\n<tr>\n<td>Public IP address</td>\n<td><strong>&lt;new&gt;</strong></td>\n</tr>\n<tr>\n<td>Public IP name</td>\n<td><strong>firewall-pip</strong></td>\n</tr>\n</tbody>\n</table>\n<h2>Requirement 2: Configure an Azure firewall</h2>\n<p>To complete this requirement you will add NAT rules to the firewall to allow web traffic and SSH traffic from the public internet.  The web traffic will be over port 80 and will be directed to port 80 on the firewall-lb load balancer.  SSH traffic will be to ports 50001 and 50002 and will map to port 22 on the virtual machines.  To complete this requirement:</p>\n<ul>\n<li>Record the following IP addresses:</li>\n<li>Firewall public IPv4 address</li>\n<li>load balancer front end IPv4 address</li>\n<li>firewall-web1-vm private IPv4 address</li>\n<li>firewall-web2-vm private IPv4 address</li>\n<li>Add a NAT rule collection named <strong>primary</strong> to the <strong>task-firewall</strong> firewall. Use the following settings:</li>\n</ul>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Rule collection</td>\n<td><strong>primary</strong></td>\n</tr>\n<tr>\n<td>Priority</td>\n<td><strong>100</strong></td>\n</tr>\n<tr>\n<td><strong>Rule1</strong></td>\n<td></td>\n</tr>\n<tr>\n<td>Name</td>\n<td><strong>http</strong></td>\n</tr>\n<tr>\n<td>Protocol</td>\n<td><strong>TCP</strong></td>\n</tr>\n<tr>\n<td>Source type</td>\n<td><strong>IP address</strong></td>\n</tr>\n<tr>\n<td>Source</td>\n<td><strong>&ast;</strong></td>\n</tr>\n<tr>\n<td>Destination address</td>\n<td><strong>&lt;firewall public ip&gt;</strong></td>\n</tr>\n<tr>\n<td>Destination ports</td>\n<td><strong>80</strong></td>\n</tr>\n<tr>\n<td>Translated address</td>\n<td><strong>&lt;load balancer front end IP&gt;</strong></td>\n</tr>\n<tr>\n<td>Translated ports</td>\n<td><strong>80</strong></td>\n</tr>\n<tr>\n<td><strong>Rule2</strong></td>\n<td></td>\n</tr>\n<tr>\n<td>Name</td>\n<td><strong>ssh1</strong></td>\n</tr>\n<tr>\n<td>Protocol</td>\n<td><strong>TCP</strong></td>\n</tr>\n<tr>\n<td>Source type</td>\n<td><strong>IP address</strong></td>\n</tr>\n<tr>\n<td>Source</td>\n<td><strong>&ast;</strong></td>\n</tr>\n<tr>\n<td>Destination address</td>\n<td><strong>&lt;firewall public ip&gt;</strong></td>\n</tr>\n<tr>\n<td>Destination ports</td>\n<td><strong>50001</strong></td>\n</tr>\n<tr>\n<td>Translated address</td>\n<td><strong>&lt;firewall-web1-vm IP&gt;</strong></td>\n</tr>\n<tr>\n<td>Translated ports</td>\n<td><strong>22</strong></td>\n</tr>\n<tr>\n<td><strong>Rule3</strong></td>\n<td></td>\n</tr>\n<tr>\n<td>Name</td>\n<td><strong>ssh2</strong></td>\n</tr>\n<tr>\n<td>Protocol</td>\n<td><strong>TCP</strong></td>\n</tr>\n<tr>\n<td>Source type</td>\n<td><strong>IP address</strong></td>\n</tr>\n<tr>\n<td>Source</td>\n<td><strong>&ast;</strong></td>\n</tr>\n<tr>\n<td>Destination address</td>\n<td><strong>&lt;firewall public ip&gt;</strong></td>\n</tr>\n<tr>\n<td>Destination ports</td>\n<td><strong>50002</strong></td>\n</tr>\n<tr>\n<td>Translated address</td>\n<td><strong>&lt;firewall-web2-vm IP&gt;</strong></td>\n</tr>\n<tr>\n<td>Translated ports</td>\n<td><strong>22</strong></td>\n</tr>\n</tbody>\n</table>\n<h2>Requirement 3:Verify the firewall</h2>\n<p>To complete this task you will validate that HTTP traffic and ssh traffic are being properly routed through the firewall.  First, open a browser window and navigate to the public IP address of the firewall.  You should return the name of the server that handled the request.  Next, open an Azure cloud shell and enter the following command:</p>\n<pre class=\"codehilite\"><code class=\"language-bash\">ssh student@&lt;public ip address of your firewall&gt;:50001</code></pre>\n\n<p>Enter yes when prompted and enter the password: <strong>Pa55w.rd!</strong>.  You should end up at the shell prompt for the firewall-web1-vm virtual machine.</p>\n<h2>Clean up</h2>\n<ul>\n<li>Delete the <strong>task-fwall-rg</strong> resource group.</li>\n</ul>\n<h2>Solution</h2>\n<p>Having trouble completing this task?  View the demonstration video to see how to do it.</p>",
    "tasks": "",
    "tasks_html": "",
    "published_date": "2020-06-16T15:32:04Z",
    "solutions": "",
    "solutions_html": "",
    "flags": [],
    "min_points_to_pass": null,
    "access_type": "default",
    "user_status": "unstarted",
    "user_lab_status": null,
    "user_status_modified": null,
    "user_flags": []
}