Skip to content

Upgrading Wallarm NGINX modules 2.18 or lower

These instructions describe the steps to upgrade the Wallarm NGINX modules 2.18 or lower to version 3.6. Wallarm NGINX modules are the modules installed in accordance with one of the following instructions:

Wallarm nodes 2.18 and lower have been deprecated

You are recommended to upgrade the Wallarm nodes 2.18 and lower since these versions are fully deprecated.

Node configuration and traffic filtration have been significantly simplified in the Wallarm node of version 3.6. Before upgrading the modules, please carefully review the list of changes and general recommendations. Please note that some settings of node 3.6 are incompatible with the nodes 2.18 and lower.

Upgrade procedure

  • If filtering node and postanalytics modules are installed on the same server, then follow the instructions below to upgrade all packages.

  • If filtering node and postanalytics modules are installed on different servers, first upgrade the postanalytics module following these instructions and then perform the steps below for filtering node modules.

Step 1: Inform Wallarm technical support that you are upgrading filtering node modules

Inform Wallarm technical support that you are updating filtering node modules up to 3.6 and ask to enable new IP lists logic for your Wallarm account. When new IP lists logic is enabled, please open Wallarm Console and ensure that the section IP lists is available.

Step 2: Disable the Active threat verification module (if upgrading node 2.16 or lower)

If upgrading Wallarm node 2.16 or lower, please disable the Active threat verification module in Wallarm Console → Scanner → Settings.

The module operation can cause false positives during the upgrade process. Disabling the module minimizes this risk.

Step 3: Upgrade NGINX to the latest stable version

Update NGINX / NGINX Plus to the latest stable release from the official NGINX repository.

If your infrastructure needs to use a specific version of NGINX, please contact the Wallarm technical support to build the API Security module for a custom version of NGINX.

Step 4: Add new Wallarm repository

Delete the previous Wallarm repository address and add a repository with a new Wallarm node version package. Please use the commands for the appropriate platform.

CentOS and Amazon Linux 2.0.2021x and lower

sudo yum remove wallarm-node-repo
sudo yum clean all
sudo rpm -i https://repo.wallarm.com/centos/wallarm-node/6/3.6/x86_64/Packages/wallarm-node-repo-1-6.el6.noarch.rpm
sudo yum remove wallarm-node-repo
sudo yum clean all
sudo rpm -i https://repo.wallarm.com/centos/wallarm-node/7/3.6/x86_64/Packages/wallarm-node-repo-1-6.el7.noarch.rpm

Support for CentOS 8.x has been deprecated

Support for CentOS 8.x has been deprecated. You can install the Wallarm node 3.6 on the AlmaLinux, Rocky Linux or Oracle Linux 8.x operating system insted.

Debian and Ubuntu

  1. Open the file with the Wallarm repository address in the installed text editor. In these instructions, vim is used.

    sudo vim /etc/apt/sources.list.d/wallarm.list
    
  2. Comment out or delete the previous repository address.

  3. Add a new repository address:

    deb http://repo.wallarm.com/debian/wallarm-node stretch/3.6/
    
    deb http://repo.wallarm.com/debian/wallarm-node stretch/3.6/
    deb http://repo.wallarm.com/debian/wallarm-node stretch-backports/3.6/
    
    deb http://repo.wallarm.com/debian/wallarm-node buster/3.6/
    
    deb http://repo.wallarm.com/ubuntu/wallarm-node bionic/3.6/
    
    deb http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/
    

Step 5: Migrate whitelists and blacklists from the previous Wallarm node version to 3.6

Migrate whitelist and blacklist configuration from previous Wallarm node version to 3.6.

Step 6: Upgrade Wallarm API Security packages

Filtering node and postanalytics on the same server

  1. Execute the following command to upgrade the filtering node and postanalytics modules:

    sudo apt update
    sudo apt dist-upgrade
    

    The error "signatures couldn't be verified"

    If added GPG keys expired, the following error would be returned:

    W: GPG error: http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release:The following
    signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
    E: The repository 'http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    

    To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:

    curl -fsSL https://repo.wallarm.com/wallarm.gpg | sudo apt-key add -
    sudo apt update
    sudo apt dist-upgrade
    
    sudo apt update
    sudo apt dist-upgrade
    

    The error "signatures couldn't be verified"

    If added GPG keys expired, the following error would be returned:

    W: GPG error: http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release:The following
    signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
    E: The repository 'http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    

    To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:

    curl -fsSL https://repo.wallarm.com/wallarm.gpg | sudo apt-key add -
    sudo apt update
    sudo apt dist-upgrade
    
    sudo yum update
    
  2. If the package manager asks for confirmation to rewrite the content of the configuration file /etc/cron.d/wallarm-node-nginx:

    1. Ensure that the IP lists migration is completed.
    2. Confirm the file rewrite by using the option Y.

      The package manager would ask for the rewrite confirmation if the file /etc/cron.d/wallarm-node-nginx had been changed in the previous Wallarm node versions. Since IP list logic was changed in Wallarm node 3.x, the /etc/cron.d/wallarm-node-nginx content was updated accordingly. For the IP address blacklist to operate correctly, the Wallarm node 3.x should use the updated configuration file.

      By default, the package manager uses the option N but the option Y is required for the correct IP address blacklist operation in Wallarm node 3.x.

Filtering node and postanalytics on different servers

Sequence of steps to upgrade the filtering node and postanalytics modules

If the filtering node and postanalytics modules are installed on different servers, then it is required to upgrade the postanalytics packages before updating the filtering node packages.

  1. Upgrade postanalytics packages following these instructions.

  2. Upgrade Wallarm node packages:

    sudo apt update
    sudo apt dist-upgrade
    

    The error "signatures couldn't be verified"

    If added GPG keys expired, the following error would be returned:

    W: GPG error: http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release:The following
    signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
    E: The repository 'http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    

    To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:

    curl -fsSL https://repo.wallarm.com/wallarm.gpg | sudo apt-key add -
    sudo apt update
    sudo apt dist-upgrade
    
    sudo apt update
    sudo apt dist-upgrade
    

    The error "signatures couldn't be verified"

    If added GPG keys expired, the following error would be returned:

    W: GPG error: http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release:The following
    signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
    E: The repository 'http://repo.wallarm.com/ubuntu/wallarm-node focal/3.6/ Release' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    

    To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:

    curl -fsSL https://repo.wallarm.com/wallarm.gpg | sudo apt-key add -
    sudo apt update
    sudo apt dist-upgrade
    
    sudo yum update
    
  3. If the package manager asks for confirmation to rewrite the content of the configuration file /etc/cron.d/wallarm-node-nginx:

    1. Ensure that the IP lists migration is completed.
    2. Confirm the file rewrite by using the option Y.

      The package manager would ask for the rewrite confirmation if the file /etc/cron.d/wallarm-node-nginx had been changed in the previous Wallarm node versions. Since IP list logic was changed in Wallarm node 3.x, the /etc/cron.d/wallarm-node-nginx content was updated accordingly. For the IP address blacklist to operate correctly, the Wallarm node 3.x should use the updated configuration file.

      By default, the package manager uses the option N but the option Y is required for the correct IP address blacklist operation in Wallarm node 3.x.

Step 7: Update the Wallarm blocking page

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

If the page &/usr/share/nginx/html/wallarm_blocked.html was configured to be returned in response to blocked requests, copy and customize the new version of a sample page.

Step 8: Rename deprecated NGINX directives

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.

Step 9: Adjust Wallarm node filtration mode settings to changes released in the latest versions

  1. Ensure that the expected behavior of settings listed below corresponds to the changed logic of the off and monitoring filtration modes:

  2. If the expected behavior does not correspond to the changed filtration mode logic, please adjust the filtration mode settings to released changes using the instructions.

Step 10: Restart NGINX

sudo systemctl restart nginx
sudo service nginx restart
sudo systemctl restart nginx

Step 11: Test Wallarm node operation

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

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

    Attacks in the interface

Step 12: Re-enable the Active threat verification module (if upgrading node 2.16 or lower)

Learn the recommendation on the Active threat verification module setup and re-enable it if required.

After a while, ensure the module operation does not cause false positives. If discovering false positives, please contact the Wallarm technical support.

Settings customization

Wallarm API Security modules are updated to version 3.4. Previous filtering node settings will be applied to the new version automatically. To make additional settings, use the available directives.

Common customization options:

Back to top