Skip to content

Upgrading the cloud node image

These instructions describe the steps to upgrade the cloud node image 3.4 or 3.2 deployed on AWS or GCP up to 3.6.

To upgrade the node 2.18 or lower, please use the different instructions.

Step 1: Launch a new instance with the filtering node 3.6

  1. Open the Wallarm filtering node image on the cloud platform marketplace and proceed to the image launch:

  2. At the launch step, set the following settings:

    • Select the image version 3.6.x
    • For AWS, select the created security group in the field Security Group Settings
    • For AWS, select the name of the created key pair in the field Key Pair Settings
  3. Confirm the instance launch.

  4. For GCP, configure the instance following these instructions.

Step 2: Connect the filtering node to Wallarm Cloud

  1. Connect to the filtering node instance via SSH. More detailed instructions for connecting to the instances are available in the cloud platform documentation:

  2. Connect the filtering node to Wallarm Cloud using a new node token or username and password to Wallarm Console as described in the instructions for the cloud platform:

Step 3: Copy the filtering node settings from the previous version to the new version

  1. Copy the settings for processing and proxying requests from the following configuration files of the previous Wallarm node version to the files of the filtering node 3.6:

    • /etc/nginx/nginx.conf and other files with NGINX settings
    • /etc/nginx/conf.d/wallarm.conf with global filtering node settings
    • /etc/nginx/conf.d/wallarm-status.conf with the filtering node monitoring service settings
    • /etc/environment with environment variables
    • /etc/default/wallarm-tarantool with Tarantool settings
    • other files with custom settings for processing and proxying requests
  2. Rename the following NGINX directives if they are explicitly specified in configuration files:

    We only changed the names of the directives, their logic remains the same. Directives with former names will be deprecated soon, so you are recommended to rename them before.

  3. If the page &/usr/share/nginx/html/wallarm_blocked.html is returned to blocked requests, copy and customize its new version.

    In the new node version, the sample blocking page has been changed. The logo and support email on the page are now empty by default.

Detailed information about working with NGINX configuration files is available in the official NGINX documentation.

The list of filtering node directives is available here.

Step 4: Transfer the overlimit_res attack detection configuration from directives to the rule

Starting from the version 3.6, you can fine-tune the overlimit_res attack detection using the rule in Wallarm Console.

Earlier, the wallarm_process_time_limit and wallarm_process_time_limit_block NGINX directives have been used. The listed directives are considered to be deprecated with the new rule release and will be deleted in future releases.

If the overlimit_res attack detection settings are customized via the listed directives, it is recommended to transfer them to the rule as follows:

  1. Open Wallarm Console → Rules and proceed to the Fine-tune the overlimit_res attack detection rule setup.

  2. Configure the rule as done via the NGINX directives:

    • The rule condition should match the NGINX configuration block with the wallarm_process_time_limit and wallarm_process_time_limit_block directives specified.
    • The time limit for the node to process a single request (milliseconds): the value of wallarm_process_time_limit.
    • Request processing: the Stop processing option is recommended.

      Risk of running out of system memory

      The high time limit and/or continuation of request processing after the limit is exceeded can trigger memory exhaustion or out-of-time request processing.

    • Register the overlimit_res attack: the Register and display in the events option is recommended.

      If the wallarm_process_time_limit_block or process_time_limit_block value is off, choose the Do not create attack event option.

    • The rule does not have the explicit equivalent option for the wallarm_process_time_limit_block directive. If the rule sets Register and display in the events, the node will either block or pass the overlimit_res attack depending on the node filtration mode:

      • In the monitoring mode, the node forwards the original request to the application address. The application has the risk to be exploited by the attacks included in both processed and unprocessed request parts.
      • In the safe blocking mode, the node blocks the request if it is originated from the graylisted IP address. Otherwise, the node forwards the original request to the application address. The application has the risk to be exploited by the attacks included in both processed and unprocessed request parts.
      • In the block mode, the node blocks the request.
  3. Delete the wallarm_process_time_limit and wallarm_process_time_limit_block NGINX directives from the NGINX configuration file.

    If the overlimit_res attack detection is fine-tuned using both the directives and the rule, the node will process requests as the rule sets.

Step 5: Restart NGINX

Restart NGINX to apply the settings:

sudo systemctl restart nginx

Step 6: Test Wallarm node operation

  1. Send the request with test SQLI and XSS attacks to the protected resource address:

    curl http://localhost/?id='or+1=1--a-<script>prompt(1)</script>'
    
  2. Open the Wallarm Console → Attacks section in the US Cloud or EU Cloud and ensure attacks are displayed in the list.
    Attacks in the interface

Step 7: Create the virtual machine image based on the filtering node 3.6 in AWS or GCP

To create the virtual machine image based on the filtering node 3.6, please follow the instructions for AWS or GCP.

Step 8: Delete the previous Wallarm node instance

If the new version of the filtering node is successfully configured and tested, remove the instance and virtual machine image with the previous version of the filtering node using the AWS or GCP management console.