Wallarm Documentation - Upgrading DEB/RPM Packages (original) (raw)

Upgrading Wallarm NGINX modules

These instructions describe the steps to upgrade the Wallarm NGINX modules 4.x installed from the individual packages to version 6.x. These are the modules installed in accordance with one of the following instructions:

Upgrading with all-in-one installer

Since version 4.10, upgrading is performed using Wallarm's all-in-one installer as the individual Linux packages have been deprecated. This method simplifies the upgrade process and ongoing deployment maintenance compared to the previous approach.

The installer automatically performs the following actions:

  1. Checking your OS and NGINX version.
  2. Adding Wallarm repositories for the detected OS and NGINX version.
  3. Installing Wallarm packages from these repositories.
  4. Connecting the installed Wallarm module to your NGINX.
  5. Connecting the filtering node to Wallarm Cloud using the provided token.

All-in-one compared to manual

To upgrade the end‑of‑life node (3.6 or lower), please use the different instructions.

Requirements

Upgrade procedure

Step 1: Prepare clean machine

When upgrading modules with all-in-one installer, you cannot upgrade an old package installation - instead you need to use a clean machine. Thus, as step 1, prepare a machine with one of the supported OS:

Using new clean machine will lead to that at some moment you will have both old and new node, which is good: you can test the new one working properly without stopping the old one.

Step 2: Install latest NGINX and dependencies

Install the latest NGINX version of:

Step 3: Prepare Wallarm token

To install node, you will need a Wallarm token of the appropriate type. To prepare a token:

API tokenNode token

  1. Open Wallarm Console → SettingsAPI tokens in the US Cloud or EU Cloud.

  2. Find or create API token with the Node deployment/Deployment usage type.

  3. Copy this token.

  4. Open Wallarm Console → Nodes in the US Cloud or EU Cloud.

  5. Do one of the following:

    • Create the node of the Wallarm node type and copy the generated token.
    • Use existing node group - copy token using node's menu → Copy token.

Step 4: Download all-in-one Wallarm installer

Wallarm suggests all-in-one installations for the following processors:

To download all-in-one Wallarm installation script, execute the command:

x86_64 versionARM64 version (beta)

[](#%5F%5Fcodelineno-7-1)curl -O https://meganode.wallarm.com/6.0/wallarm-6.0.2.x86_64-glibc.sh

[](#%5F%5Fcodelineno-8-1)curl -O https://meganode.wallarm.com/6.0/wallarm-6.0.2.aarch64-glibc.sh

Step 5: Run all-in-one Wallarm installer

Filtering node and postanalytics on the same server

  1. Run downloaded script:
    API tokenNode token
    `# If using the x86_64 version:
    sudo env WALLARM_LABELS='group=' sh wallarm-6.0.2.x86_64-glibc.sh


# If using the ARM64 version:
sudo env WALLARM_LABELS='group=' sh wallarm-6.0.2.aarch64-glibc.sh
TheWALLARM_LABELSvariable sets group into which the node will be added (used for logical grouping of nodes in the Wallarm Console UI). # If using the x86_64 version:
sudo sh wallarm-6.0.2.x86_64-glibc.sh

# If using the ARM64 version:
sudo sh wallarm-6.0.2.aarch64-glibc.sh
` 2. Select US Cloud or EU Cloud. 3. Enter Wallarm token.

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 module following these instructions.
  2. Upgrade filtering node:
    API tokenNode token
    `# If using the x86_64 version:
    sudo env WALLARM_LABELS='group=' sh wallarm-6.0.2.x86_64-glibc.sh filtering


# If using the ARM64 version:
sudo env WALLARM_LABELS='group=' sh wallarm-6.0.2.aarch64-glibc.sh filtering
TheWALLARM_LABELSvariable sets group into which the node will be added (used for logical grouping of nodes in the Wallarm Console UI). # If using the x86_64 version:
sudo sh wallarm-6.0.2.x86_64-glibc.sh filtering

# If using the ARM64 version:
sudo sh wallarm-6.0.2.aarch64-glibc.sh filtering
`

Step 6: Transfer NGINX and postanalytics configuration from old node machine to new

Migrate the node-related NGINX and postanalytics configurations from the old machine to the new one by copying the necessary directives or files:

Step 7: Restart NGINX

Restart NGINX using the following command:

[](#%5F%5Fcodelineno-13-1)sudo systemctl restart nginx

Step 8: Test Wallarm node operation

To test the new node operation:

  1. Send the request with test SQLI and XSS attacks to the protected resource address:
    [](#%5F%5Fcodelineno-14-1)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.
  3. As soon as your Cloud stored data (rules, IP lists) is synchronized to the new node, perform some test attacks to make sure your rules work as expected.

Step 9: Configure sending traffic to Wallarm node

Update targets of your load balancer to send traffic to the Wallarm instance. For details, please refer to the documentation on your load balancer.

Before full redirecting of the traffic to the new node, it is recommended to first redirect it partially and check that the new node behaves as expected.

Step 10: Remove old node

  1. Delete old node in Wallarm Console → Nodes by selecting your node and clicking Delete.
  2. Confirm the action.
    When the node is deleted from Cloud, it will stop filtration of requests to your applications. Deleting the filtering node cannot be undone. The node will be deleted from the list of nodes permanently.
  3. Delete machine with the old node or just clean it from Wallarm node components:
    DebianUbuntuCentOS or Amazon Linux 2.0.2021x and lowerAlmaLinux, Rocky Linux or Oracle Linux 8.xRHEL 8.x
    [](#%5F%5Fcodelineno-15-1)sudo apt remove wallarm-node nginx-module-wallarm
    [](#%5F%5Fcodelineno-16-1)sudo apt remove wallarm-node nginx-module-wallarm
    [](#%5F%5Fcodelineno-17-1)sudo yum remove wallarm-node nginx-module-wallarm
    [](#%5F%5Fcodelineno-18-1)sudo yum remove wallarm-node nginx-module-wallarm
    [](#%5F%5Fcodelineno-19-1)sudo yum remove wallarm-node nginx-module-wallarm