Launch the VM-Series Firewall Using a Terraform Template

After modifying the templates for your OCI environment, you can launch the VM-Series firewall.
The VM-Series firewall image boots up with the default username and password (admin/admin). To ensure that your VM-Series firewall instance is protected until you can change the default password, restrict the security list of the management subnet to your source IP address before deploying the VM-Series firewall.
  1. If you have not done so already, install Terraform on your computer.
  2. In the command line on your computer, access the folder containing your Terraform Template files.
  3. Initialize and verify the provider; OCI in this case. Execute the following command:
    terraform init
    You see the following upon successful initialization:
  4. Validate the template files. Execute the following command to validate the files. If this command returns an error, correct the listed error in your files.
    terraform validate
  5. (
    ) You can use the following command to display a plan of your deployment using the data from the templates.
    terraform plan
  6. Launch the VM-Series firewall instance. Enter yes when prompted.
    terrafom apply
    When the process is complete, the CLI displays the following:
  7. Verify that your VM-Series firewall instance was launched.
    1. Log in to the OCI console.
    2. Select
    3. Select
      Created Date (Desc)
      from the
      Sort By
      drop-down to see the most recently created instances.
      Your new VM-Series firewall instance should be listed first.
  8. Delete default security list rules to prevent access to the firewall until you have changed the default password.
    1. Select
      Virtual Cloud Networks
      <your VCN>
      Security Lists
      Default Security List
      Edit All Rules
    2. Click the delete icon to delete each rule.
    3. After deleting each rule, click
      Save Security List Rules
  9. Change the default password through a console connection to the firewall.
    1. Configure a console connection.
      1. Generate a public key and copy it.
      2. Log in to the OCI console.
      3. Select
        and click your VM-Series firewall instance.
      4. Select
        Console Connections
        Create Console Connection
        Paste SSH Keys
      5. Paste your key and click
        Create Console Connection
    2. Open a console connection to the VM-Series firewall.
      1. Select
        Connect with SSH
      2. Copy the string used to open the console connection to the VM-Series firewall.
      3. Open a terminal on your computer and, from the directory containing your keypair, paste the string you copied above and hit Enter.
    3. Change the password.
      1. Enter config mode.
        admin@PA-VM> configure
      2. Execute the following command to change the password. When prompted, enter your new password and enter it again to confirm.
        admin@PA-VM# set mgt-config users admin password
      3. Commit your changes.
  10. Add route table rules to the management route table to give yourself SSH and web interface access to the firewall.
    1. Select
      Virtual Cloud Networks
      and click your VCN.
    2. Select
      Route Tables
      and click your management route table.
    3. Select
      Edit Route Rules
      + Another Route Rule
    4. Select your compartment.
    5. Enter a descriptive
      for your route table.
    6. Select a target type. For subnets that are publicly accessible, select Internet Gateway.
    7. Enter a
      Destination CIDR Block
    8. Select the internet gateway you created previously from the
      Target Internet Gateway
    9. Click Create
  11. Edit security lists to give yourself SSH and web interface access to the firewall.
    1. From your VCN, select
      Security Lists
      Edit All Rules
      mgmt-security-list is the default name used in the Terraform Template file. If you have changed this value, locate you management security list.
    2. Select CIDR from the
      Source Type
      drop-down and
      Source CIDR
    3. Select TCP from the
      IP Protocol
    4. Enter source and destination ports or port ranges. If you leave these fields blank, all ports are allowed. Port 22 is required for SSH access and port 443 is required for SSL access to the firewall web interface.
    5. Click
      Create Security List
  12. Configure the dataplane network interfaces as Layer 3 interfaces on the firewall.
    1. Log in to the firewall.
    2. Select
    3. Click the link for
      ethernet 1/1
      and configure as follows:
      • Interface Type
      • On the
        tab, assign the interface to the default router.
      • On the
        tab, expand the
        Security Zone
        drop-down and select
        New Zone
        . Define a new zone, for example untrust-zone, and then click
      • On the
        tab, select either
        DHCP Client
        If using the
        option, click
        in the IP section, and enter the IP address and network mask for the interface. Make sure that the IP address matches the IP address that you assigned to the corresponding subnet in VCN. For example, if you add this interface to your untrust zone, make sure you assign the untrust vNIC IP address configured in your VCN.
    4. Repeat this procedure for each vNIC configured in your VCN except your management vNIC.
  13. Create NAT rules to allow inbound and outbound traffic form the servers deployed in VCN.
    1. Select
      on the web interface of the firewall.
    2. Create a NAT rule that allows traffic from the external-facing or untrust dataplane network interface on the firewall to the trust interface in the VCN.
    3. Create a NAT rule that allows outbound access for traffic from inside the VCN to the internet.
  14. Disable DPDK on the firewall. The VM-Series firewall on OCI supports Packet MMAP only. DPDK is enabled by default and must be disabled.
    1. Log in to the firewall CLI.
    2. Disable DPDK.
      admin@PA-VM> set system setting dpdk-pkt-io off
    3. Restart the firewall.
  15. (
    ) If you need more storage than the minimum 60GB required by the VM-Series firewall, you can create and attach a storage volume to your VM-Series firewall instance.
    1. Log in to the OCI console.
    2. Select
      Block Volumes
      Create Block Volume
    3. Select your compartment.
    4. Enter a descriptive
      for your block storage volume.
    5. Select an
      Availability Zone
    6. Enter the size for your block volume.
    7. Click
      Create Block Volume
    8. Select
      , click on your newly-created instance, and select
      Attached Block Volumes
      Attach Block Volume
    9. Select
    10. Select your compartment.
    11. Select the block volume you created previously from the Block Volume drop-down.
    12. Select
    13. Click
    14. Reboot the VM-Series firewall instance by clicking
      on the Instance Details page.

Recommended For You