コンテンツにスキップ

Docker NGINXベースイメージのアップグレード

本手順では、稼働中のDocker NGINXベースイメージを最新の6.xにアップグレードする手順を説明します。

既存のWallarm nodeの認証情報の使用

以前のバージョンの既存のWallarm nodeを使用することは推奨しません。本手順に従い、6.xバージョンの新しいフィルタリングノードを作成し、Dockerコンテナとしてデプロイしてください。

サポート終了のノード(3.6以下)をアップグレードする場合は、別の手順をご利用ください。

要件

  • Docker installed on your host system

  • Access to https://hub.docker.com/r/wallarm/node to download the Docker image. Please ensure the access is not blocked by a firewall

  • Access to the account with the Administrator role in Wallarm Console in the US Cloud or EU Cloud

  • Access to https://us1.api.wallarm.com if working with US Wallarm Cloud or to https://api.wallarm.com if working with EU Wallarm Cloud. Please ensure the access is not blocked by a firewall

  • Access to the IP addresses and their corresponding hostnames (if any) listed below. This is needed for downloading updates to attack detection rules and API specifications, as well as retrieving precise IPs for your allowlisted, denylisted, or graylisted countries, regions, or data centers

    node-data0.us1.wallarm.com - 34.96.64.17
    node-data1.us1.wallarm.com - 34.110.183.149
    us1.api.wallarm.com - 35.235.66.155
    34.102.90.100
    34.94.156.115
    35.235.115.105
    
    node-data1.eu1.wallarm.com - 34.160.38.183
    node-data0.eu1.wallarm.com - 34.144.227.90
    api.wallarm.com - 34.90.110.226
    

手順1: 更新されたフィルタリングノードイメージをダウンロードする

docker pull wallarm/node:6.4.1

手順2: 実行中のコンテナを停止する

docker stop <RUNNING_CONTAINER_NAME>

手順3: 新しいイメージでコンテナを実行する

  1. バージョン5.x以前からアップグレードする場合は、以下の重要な変更点に注意してください:

    • 以前に環境変数TARANTOOL_MEMORY_GBでpostanalyticsメモリを設定していた場合は、SLAB_ALLOC_ARENAに名称を変更してください。
    • カスタムNGINX設定ファイルをマウントしてDockerコンテナを実行している場合:

      • Alpine Linuxのディレクトリ規約に合わせ、/etc/nginx/nginx.conf内のincludeパスが変更されました:

        ...
        
        - include /etc/nginx/modules-enabled/*.conf;
        + include /etc/nginx/modules/*.conf;
        
        ...
        
        http {
        -     include /etc/nginx/sites-enabled/*;
        +     include /etc/nginx/http.d/*;
        }
        
      • /etc/nginx/conf.d/wallarm-status.conf内で、許可するIPアドレスを定義するallowディレクティブのデフォルト値が変更されました:

        ...
        
        - allow 127.0.0.8/8;
        + allow 127.0.0.0/8;
        
        ...
        
      • バーチャルホストの設定ファイルをマウントするパスは、/etc/nginx/sites-enabled/defaultから/etc/nginx/http.dに変更されました。

  2. Wallarm Console → SettingsAPI Tokensに進み、使用タイプがNode deployment/Deploymentのトークンを生成します。

  3. 生成したトークンをコピーします。

  4. 新しいイメージでコンテナを実行し、更新された設定を適用します。

    更新されたイメージでコンテナを実行する方法は2通りあります:

手順4: フィルタリングノードの動作をテストする

  1. Send the request with test Path Traversal attack to a protected resource address:

    curl http://localhost/etc/passwd
    

    If traffic is configured to be proxied to example.com, include the -H "Host: example.com" header in the request.

  2. Open Wallarm Console → Attacks section in the US Cloud or EU Cloud and make sure the attack is displayed in the list.

    Attacks in the interface

  3. Optionally, test other aspects of the node functioning.

手順5: 以前のバージョンのフィルタリングノードを削除する

デプロイ済みの6.xイメージが正しく動作している場合は、Wallarm Console → Nodesで以前のバージョンのフィルタリングノードを削除できます。