Use the ARM Template to Deploy the VM-Series Firewall

In addition to Marketplace based deployments, Palo Alto Networks provides a GitHub repository which hosts sample ARM templates that you can download and customize for your needs. ARM templates are JSON files that describe the resources required for individual resources such as network interfaces, a complete virtual machine or even an entire application stack with multiple virtual machines.
ARM templates are for advanced users, and Palo Alto Networks provides the ARM template under the community supported policy. To learn about ARM templates, refer to the Microsoft documentation on ARM Templates.
To simplify the deployment of all the required resources, the two-tier sample template (https://github.com/PaloAltoNetworks/azure/tree/master/two-tier-sample) includes two json files:
  • Template File—The azureDeploy.json is the main resources file that deploys all the components within the resource group.
  • Parameters File—The azureDeploy.parameters.json is the file that includes the parameters required to successfully deploy the VM-Series firewall in the VNet. It includes details such as the virtual machine tier and size, username and password for the firewall, the name of the storage container for the firewall. You can customize this file for your Azure VNet deployment.
To help you deploy the firewall as a gateway for Internet-facing applications, the template provisions the VM-Series firewall, a database server, and a web server. The VNet uses the private non-routable IP address space 192.168.0.0/16. You can modify the template to use 172.16.0.0/12, or 10.0.0.0/8.
The ARM template also provides the necessary user-defined rules and IP forwarding flags to enable the VM-Series firewall to secure the Azure resource group. For the five subnets—Trust, Untrust, Web, DB, and NAT—included in the template, you have five route tables, one for each subnet with user defined rules for routing traffic to the VM-Series firewall and the NAT virtual machine.
For the four subnets—Trust, Untrust, Web, and DB—included in the template, you have four route tables, one for each subnet with user defined rules for routing traffic to the VM-Series firewall.
Deploying VM-Series Firewall using the ARM Template
azure_gateway_deployment_details.png
  1. Download the two-tier sample ARM template from the GitHub repository.
  2. (Only for Azure China) Copy the VHD image for the VM-Series firewall to your Azure storage account.
  3. Create a Resource Group on Azure.
    1. Log in to the Azure CLI using the command: azure login
      If you need help, refer to the Azure documentation on installing the CLI, or for details on how to access the CLI on Azure Government or Azure China.
    2. Switch to Resource Manager mode using the command:azure config mode arm
    3. Create a resource group.
  4. Deploy the ARM template.
    1. Open the Parameters File with a text editor and modify the values for your deployment:
      In Azure China, you must edit the path for the storage account that hosts the VHD image required to deploy the VM-Series firewall. In the variables section of the template file, find the parameter called userImageNameURI and replace the value with the location where you saved the VHD image.
    2. Deploy the template in the resource group you created.
      azure group create -v -n “<YourResourceGroupName>”
      
      -l “<YourAzureLocation>” -d “<GiveASmallDeploymentLabel>”
      
      -f azureDeploy.json -e azureDeploy.parameters.json
      Code copied to clipboard
      Unable to copy due to lack of browser support.
    3. Check the progress/status of the deployment from the Azure CLI:
      azure group deployment show "<YourResourceGroupName>"
      
      “<YourDeploymentLabel>
      Code copied to clipboard
      Unable to copy due to lack of browser support.
      When the template is successfully deployed the ProvisioningState is Running.
      If the ProvisioningState is Failed, you must check for errors on the Azure portal at Resource GroupEvents. Filter for only events in the last one hour, select the most recent events, and drill down to find the errors.
    4. Verify that you have successfully deployed the VM-Series firewall.
      1. Select DashboardResource Groups, select the resource group.
      2. Select All SettingsDeploymentsDeployment History for detailed status.
        azure_template_success.PNG
        The address space within the VNet uses the prefix 192.168, which is defined in the ARM template.
    5. Attach a public IP address to the untrust interface on the firewall.
  5. Configure the firewall as a VNet gateway to protect your Internet-facing deployment.
    1. Log in to the management interface IP address on the firewall.
    2. Configure the dataplane network interfaces as Layer 3 interfaces on the firewall (NetworkInterfacesEthernet).
    3. Add static rules to the virtual router on the firewall. To route traffic through the firewall in this example, you need three static routes on the firewall (NetworkVirtual Routers, select the router and click Static Routes):
      1. Route all outbound traffic through the UnTrust zone, ethernet1/1 to the Azure router at 192.168.1.1.
      2. Route all inbound traffic destined to the web server subnet through the Trust zone, ethernet1/2 to the Azure router at 192.168.2.1.
      3. Route all inbound traffic destined to the database server subnet through the Trust zone, ethernet1/2 to the Azure router at 192.168.2.1.
    4. Create security policy rules (PoliciesSecurity) to allow inbound and outbound traffic on the firewall. You also need security policy rules to allow appropriate traffic from the web server subnet to the database server subnet and vice versa.
    5. Commit the changes on the firewall.
    6. Verify that the VM-Series firewall is securing traffic (MonitorLogsTraffic).

Related Documentation