Ana içeriğe geç

EOL Docker NGINX- veya Envoy-tabanlı görüntüsünün yükseltilmesi

[waf-mode-instr]:                   ../../admin-en/configure-wallarm-mode.md
[blocking-page-instr]:              ../../admin-en/configuration-guides/configure-block-page-and-code.md
[logging-instr]:                    ../../admin-en/configure-logging.md
[proxy-balancer-instr]:             ../../admin-en/using-proxy-or-balancer-en.md
[process-time-limit-instr]:         ../../admin-en/configure-parameters-en.md#wallarm_process_time_limit
[allocating-memory-guide]:          ../../admin-en/configuration-guides/allocate-resources-for-node.md
[ptrav-attack-docs]:                ../../attacks-vulns-list.md#path-traversal
[attacks-in-ui-image]:           ../../images/admin-guides/test-attacks-quickstart.png
[nginx-process-time-limit-docs]:    ../../admin-en/configure-parameters-en.md#wallarm_process_time_limit
[nginx-process-time-limit-block-docs]:  ../../admin-en/configure-parameters-en.md#wallarm_process_time_limit_block
[overlimit-res-rule-docs]:           ../../user-guides/rules/configure-overlimit-res-detection.md
[graylist-docs]:                     ../../user-guides/ip-lists/overview.md
[waf-mode-instr]:                   ../../admin-en/configure-wallarm-mode.md
[envoy-process-time-limit-docs]:    ../../admin-en/configuration-guides/envoy/fine-tuning.md#process_time_limit
[envoy-process-time-limit-block-docs]: ../../admin-en/configuration-guides/envoy/fine-tuning.md#process_time_limit_block
[ip-lists-docs]:                    ../../user-guides/ip-lists/overview.md
[api-policy-enf-docs]:              ../../api-specification-enforcement/overview.md

# Ömrünü Tamamlamış (EOL) Docker NGINX Tabanlı Görüntünün Yükseltilmesi

Bu yönergeler, çalışan ömrünü tamamlamış Docker NGINX tabanlı görüntünün (sürüm 3.6 ve altı) 5.0 sürümüne yükseltilme adımlarını açıklamaktadır.

!!! warning "Wallarm nodes 3.6 and lower are not supported"
    You are recommended to upgrade the Wallarm nodes 3.6 and lower since these versions are [not supported, they are end-of-life](../versioning-policy.md#version-list).

    Node configuration and traffic filtration have been significantly simplified in the Wallarm node of the latest versions. Before upgrading the modules, please carefully review the [list of changes](what-is-new.md) and [general recommendations](../general-recommendations.md). Please note that some settings of the latest node are **incompatible** with the nodes 3.6 and lower.

## Gereksinimler

* [Docker](https://docs.docker.com/engine/install/) 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](https://us1.my.wallarm.com/) or [EU Cloud](https://my.wallarm.com/) 
* 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 below for downloading updates to attack detection rules and [API specifications][api-policy-enf-docs], as well as retrieving precise IPs for your [allowlisted, denylisted, or graylisted][ip-lists-docs] countries, regions, or data centers

    === "US Cloud"
        ```
        34.96.64.17
        34.110.183.149
        35.235.66.155
        34.102.90.100
        34.94.156.115
        35.235.115.105
        ```
    === "EU Cloud"
        ```
        34.160.38.183
        34.144.227.90
        34.90.110.226
        ```

## Adım 1: Filtreleme düğüm modüllerini yükselttiğinizi Wallarm technical support’a bildirin (sadece node 2.18 veya daha düşük yükseltme yapılıyorsa)

Eğer node 2.18 veya daha düşük bir sürüme yükseltiyorsanız, lütfen [Wallarm technical support](mailto:support@wallarm.com) ile iletişime geçerek filtreleme düğüm modüllerini 5.0'a yükselttiğinizi bildirin ve Wallarm hesabınız için yeni IP listesi mantığının etkinleştirilmesini isteyin. Yeni IP listesi mantığı etkinleştirildiğinde, Wallarm Console’daki [**IP lists**](../../user-guides/ip-lists/overview.md) bölümünün kullanılabilir olduğundan emin olun.

## Adım 2: Threat Replay Testing modülünü devre dışı bırakın (sadece node 2.16 veya daha düşük yükseltme yapılıyorsa)

Eğer Wallarm node 2.16 veya daha düşük bir sürüme yükseltiyorsanız, lütfen Wallarm Console’daki [Threat Replay Testing](../../about-wallarm/detecting-vulnerabilities.md#threat-replay-testing) modülünü **Vulnerabilities****Configure** üzerinden devre dışı bırakın.

Modülün çalışması yükseltme işlemi sırasında [yanlış pozitiflere](../../about-wallarm/protecting-against-attacks.md#false-positives) yol açabilir. Modülü devre dışı bırakmak bu riski en aza indirir.

## Adım 3: API portunu güncelleyin

Starting with version 4.0, the filtering node uploads data to the Cloud using the `us1.api.wallarm.com:443` (US Cloud) and `api.wallarm.com:443` (EU Cloud) API endpoints instead of `us1.api.wallarm.com:444` and `api.wallarm.com:444`.

If you upgrade the node from the version 3.x or lower and your server with the deployed node has a limited access to the external resources and the access is granted to each resource separately, then after upgrade the synchronization between the filtering node and the Cloud will stop.

To restore the synchronization, in your configuration, change port `444` to `443` for API endpoint for each resource.

## Adım 4: Güncellenmiş filtreleme düğüm görüntüsünü indirin

``` bash
docker pull wallarm/node:5.3.0

Adım 5: Wallarm Cloud’a Token Tabanlı Bağlantıya Geçiş

Konteyneri Wallarm Cloud’a bağlama yöntemi aşağıdaki şekilde güncellenmiştir:

  • “email and password” tabanlı yöntem kullanımdan kaldırılmıştır. Bu yöntemde, konteyner doğru kimlik bilgileri DEPLOY_USER ve DEPLOY_PASSWORD değişkenlerine aktarılmış olması durumunda Wallarm Cloud’a otomatik olarak kaydedilirdi.

  • Token tabanlı yöntem eklenmiştir. Konteyneri Cloud’a bağlamak için, Wallarm Console UI’den kopyalanmış Wallarm API tokenını içeren WALLARM_API_TOKEN değişkeniyle konteyneri çalıştırın.

5.0 görüntüsünü çalıştırmak için yeni yöntemi kullanmanız tavsiye edilir. “email and password” tabanlı yöntem gelecekteki sürümlerde kaldırılacaktır; lütfen geçiş yapınız.

Yeni bir Wallarm düğümü oluşturmak ve tokenınızı almak için:

  1. Wallarm Console → SettingsAPI Tokens bölümünü açın ve Deploy rolü ile bir token oluşturun.

  2. Oluşturulan tokenı kopyalayın.

Adım 6: Önceki Wallarm düğüm sürümünden 5.0'a allowlist ve denylist yapılandırmasını geçirin (sadece node 2.18 veya daha düşük yükseltme yapılıyorsa)

Eğer node 2.18 veya daha düşük bir sürüme yükseltiyorsanız, önceki Wallarm düğüm sürümündeki allowlist ve denylist yapılandırmasını geçirin 5.0'a.

Adım 7: Kullanımdan Kaldırılmış Yapılandırma Seçeneklerinden Geçiş

Aşağıdaki kullanımdan kaldırılmış yapılandırma seçenekleri bulunmaktadır:

  • WALLARM_ACL_ENABLE ortam değişkeni kullanımdan kaldırılmıştır. Eğer IP listeleri yeni düğüm sürümüne geçirilmişse, bu değişkeni docker run komutundan kaldırın.

  • Aşağıdaki NGINX direktifleri yeniden adlandırılmıştır:

    Sadece direktiflerin isimleri değiştirilmiştir, mantıkları aynı kalmıştır. Önceki isimlere sahip direktifler yakında kullanımdan kaldırılacaktır; bu yüzden yeniden adlandırmanız önerilir.

    Lütfen taşınan yapılandırma dosyalarında eski isimli direktiflerin açıkça belirtilip belirtilmediğini kontrol edin. Eğer belirtiliyorsa, yeniden adlandırın.

  • wallarm_request_time loglama değişkeni wallarm_request_cpu_time olarak yeniden adlandırılmıştır.

    Sadece değişkenin ismi değiştirilmiştir, mantığı aynı kalmıştır. Eski isim geçici olarak desteklenmektedir, ancak yine de değişkenin yeniden adlandırılması tavsiye edilir.

Adım 8: Wallarm engelleme sayfasını güncelleyin (NGINX tabanlı görüntü yükseltiliyorsa)

Yeni düğüm sürümünde, Wallarm örnek engelleme sayfası değiştirilmiştir. Sayfadaki logo ve destek e-postası varsayılan olarak boş bırakılmaktadır.

Eğer Docker konteyneri, engellenen taleplere &/usr/share/nginx/html/wallarm_blocked.html sayfasını dönecek şekilde yapılandırıldıysa, bu yapılandırmayı aşağıdaki gibi değiştirin:

  1. Yeni örnek sayfanın versiyonunu kopyalayın ve özelleştirin.

  2. Özelleştirilmiş sayfayı ve NGINX yapılandırma dosyasını, bir sonraki adımda yeni Docker konteynerine bağlayın.

Adım 9: Son mimari güncellemeleri gözden geçirin (NGINX tabanlı Docker görüntüsü için)

Son güncelleme, mimari değişiklikler getirmiştir. Bu değişiklikler, özellikle konteyner başlatılırken belirli dosyaların yollarında yapılan değişiklikler nedeniyle özel yapılandırma dosyalarını monte eden kullanıcıları etkileyebilir. Yeni görüntünün doğru yapılandırılması ve kullanımı için bu değişikliklere aşina olunuz.

Adım 10: overlimit_res saldırı tespit yapılandırmasını direktiflerden kurala aktarın

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][nginx-process-time-limit-docs] and [wallarm_process_time_limit_block][nginx-process-time-limit-block-docs] NGINX directives have been used.

The listed directives and parameters 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 parameters, it is recommended to transfer them to the rule as follows:

  1. Open Wallarm Console → Rules and proceed to the [Limit request processing time][overlimit-res-rule-docs] rule setup.

  2. Configure the rule as done in the mounted configuration files:

    • The time limit for the node to process a single request (milliseconds): the value of wallarm_process_time_limit or process_time_limit.

      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.

    • The node will either block or pass the overlimit_res attack depending on the [node filtration mode][waf-mode-instr]:

      • 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][graylist-docs] 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, wallarm_process_time_limit_block NGINX directives from the mounted configuration file.

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

Adım 11: Çalışan konteyneri durdurun

docker stop <RUNNING_CONTAINER_NAME>

Adım 12: Güncellenmiş görüntüyü kullanarak konteyneri çalıştırın

Güncellenmiş görüntüyü kullanarak konteyneri çalıştırın ve görüntüdeki son değişiklikler gereği monte edilmiş dosyaların yollarında gerekli ayarlamaları yapın.

Güncellenmiş görüntüyü kullanarak konteyneri çalıştırmanın iki seçeneği bulunmaktadır:

Adım 13: Wallarm düğüm filtreleme modu ayarlarını, en son sürümlerde yayınlanan değişikliklere uyacak şekilde ayarlayın (sadece node 2.18 veya daha düşük yükseltme yapılıyorsa)

  1. Aşağıda listelenen ayarların beklenen davranışının, kapalı (off) ve izleme (monitoring) filtreleme modlarının değiştirilmiş mantığı ile uyumlu olduğunu doğrulayın:

  2. Eğer beklenen davranış, değiştirilmiş filtreleme modu mantığı ile uyuşmuyorsa, lütfen filtreleme modu ayarlarını yönergeler kullanarak güncelleyin.

Adım 14: Filtreleme düğümünün çalışmasını test edin

  1. Send the request with the test [Path Traversal][ptrav-attack-docs] attack to the application 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. Make sure the node of the new type processes the request in the same way as the regular node did, e.g.:

    • Blocks the request if the appropriate [filtration mode][waf-mode-instr] is configured.
    • Returns the [custom blocking page][blocking-page-instr] if it is configured.
  3. Open Wallarm Console → Attacks in the EU Cloud or US Cloud and make sure that:

    • The attack is displayed in the list.
    • Hit details display the Wallarm node UUID.

    ![Attacks in the interface][attacks-in-ui-image]

Adım 15: Önceki sürümlerin filtreleme düğümünü silin

Eğer 5.0 sürümüne ait dağıtılmış görüntü doğru çalışıyorsa, Wallarm Console → Nodes bölümünde önceki sürüme ait filtreleme düğümünü silebilirsiniz.

Adım 16: Threat Replay Testing modülünü yeniden etkinleştirin (sadece node 2.16 veya daha düşük yükseltme yapılıyorsa)

Threat Replay Testing modülünün kurulumu ile ilgili öneriyi inceleyin ve gerekiyorsa yeniden etkinleştirin.

Bir süre sonra, modülün çalışmasının yanlış pozitiflere yol açmadığından emin olun. Yanlış pozitifler tespit ederseniz, lütfen Wallarm technical support ile iletişime geçin.
```