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 tohttps://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
手順1: 更新されたフィルタリングノードイメージをダウンロードする¶
手順2: 実行中のコンテナを停止する¶
手順3: 新しいイメージでコンテナを実行する¶
-
バージョン5.x以前からアップグレードする場合は、以下の重要な変更点に注意してください:
- 以前に環境変数
TARANTOOL_MEMORY_GB
でpostanalyticsメモリを設定していた場合は、SLAB_ALLOC_ARENA
に名称を変更してください。 -
カスタムNGINX設定ファイルをマウントしてDockerコンテナを実行している場合:
-
Alpine Linuxのディレクトリ規約に合わせ、
/etc/nginx/nginx.conf
内のinclude
パスが変更されました: -
/etc/nginx/conf.d/wallarm-status.conf
内で、許可するIPアドレスを定義するallow
ディレクティブのデフォルト値が変更されました: -
バーチャルホストの設定ファイルをマウントするパスは、
/etc/nginx/sites-enabled/default
から/etc/nginx/http.d
に変更されました。
-
- 以前に環境変数
-
Wallarm Console → Settings → API Tokensに進み、使用タイプがNode deployment/Deploymentのトークンを生成します。
-
生成したトークンをコピーします。
-
新しいイメージでコンテナを実行し、更新された設定を適用します。
更新されたイメージでコンテナを実行する方法は2通りあります:
手順4: フィルタリングノードの動作をテストする¶
-
Send the request with test Path Traversal attack to a protected resource address:
If traffic is configured to be proxied to
example.com
, include the-H "Host: example.com"
header in the request. -
Open Wallarm Console → Attacks section in the US Cloud or EU Cloud and make sure the attack is displayed in the list.
-
Optionally, test other aspects of the node functioning.
手順5: 以前のバージョンのフィルタリングノードを削除する¶
デプロイ済みの6.xイメージが正しく動作している場合は、Wallarm Console → Nodesで以前のバージョンのフィルタリングノードを削除できます。