Ana içeriğe geç

EOL bulut node görüntüsünün yükseltilmesi

[wallarm-status-instr]:             ../../admin-en/configure-statistics-service.md
[memory-instr]:                     ../../admin-en/configuration-guides/allocate-memory-for-waf-node.md
[waf-directives-instr]:             ../../admin-en/configure-parameters-en.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
[ip-lists-docs]:                     ../../user-guides/ip-lists/overview.md
[link-wallarm-health-check]:        ../../admin-en/uat-checklist-en.md

# EOL Bulut Düğüm Görüntüsünün Yükseltilmesi

Bu talimatlar, AWS veya GCP üzerinde dağıtılmış (sürüm 3.6 ve daha düşük) EOL bulut düğüm görüntüsünün 5.0'a kadar yükseltilmesi için gerekli adımları 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

* 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, 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 düğüm 2.18 veya daha düşük yükseltiliyorsa)

Eğer düğüm 2.18 veya daha düşük yükseltiliyorsa, [Wallarm technical support](mailto:support@wallarm.com) ile iletişime geçerek filtreleme düğüm modüllerini en son sürüme yükselttiğinizi bildirin ve Wallarm hesabınız için yeni IP listesi mantığının etkinleştirilmesini talep edin. 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 düğüm 2.16 veya daha düşük yükseltiliyorsa)

Eğer Wallarm düğümü 2.16 veya daha düşük yükseltiliyorsa, lütfen Wallarm Console → **Vulnerabilities****Configure** üzerinden [Threat Replay Testing](../../about-wallarm/detecting-vulnerabilities.md#threat-replay-testing) modülünü devre dışı bırakın.

Modülün çalışması, yükseltme işlemi sırasında [yanlış pozitif sonuçlara](../../about-wallarm/protecting-against-attacks.md#false-positives) neden olabilir. Bu riski en aza indirmek için modülü devre dışı bırakın.

## 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: Son mimari güncellemeleri gözden geçirin

Son güncelleme, özellikle düğümün varsayılan konfigürasyon dosyalarını değiştiren kullanıcılar üzerinde etkisi olabilecek [mimari değişiklikleri](what-is-new.md#optimized-cloud-images) getirmiştir. Yeni görüntünün doğru şekilde yapılandırılması ve kullanılması için bu değişikliklere aşina olun.

## Adım 5: Filtreleme düğümü 5.0 ile yeni bir örnek başlatın

Önceki Wallarm düğüm sürümüne ait aşağıdaki konfigürasyon dosyalarından isteklerin işlenmesi ve proxy işlemleri için ayarları, filtreleme düğümü 5.0 dosyalarına kopyalayın:

1. Bulut platformu marketplace'inde Wallarm filtreleme düğümü görüntüsünü açın ve görüntüyü başlatmaya devam edin:
      * [Amazon Marketplace](https://aws.amazon.com/marketplace/pp/B073VRFXSD)
      * [GCP Marketplace](https://console.cloud.google.com/marketplace/details/wallarm-node-195710/wallarm-node)
2. Başlatma adımında, aşağıdaki ayarları yapın:
      * Görüntü sürümünü `5.0.x` olarak seçin
      * AWS için, **Security Group Settings** alanında [oluşturulan security group'u](../../installation/cloud-platforms/aws/ami.md#2-create-a-security-group) seçin
      * AWS için, **Key Pair Settings** alanında [oluşturulan key pair'in adını](../../installation/cloud-platforms/aws/ami.md#1-create-a-pair-of-ssh-keys-in-aws) seçin
3. Örneğin başlatılmasını onaylayın.
4. GCP için, örneği bu [talimatları](../../installation/cloud-platforms/gcp/machine-image.md#2-configure-the-filtering-node-instance) izleyerek yapılandırın.

## Adım 6: En son sürümlerde yayınlanan değişikliklere uygun olarak Wallarm düğüm filtreleme modu ayarlarını düzenleyin (sadece düğüm 2.18 veya daha düşük yükseltiliyorsa)

1. Aşağıda listelenen ayarların beklenen davranışının, [değiştirilen `off` ve `monitoring` filtreleme modlarının mantığı ile](what-is-new.md#filtration-modes) uyumlu olduğundan emin olun:
      * [Directive `wallarm_mode`](../../admin-en/configure-parameters-en.md#wallarm_mode)
      * [General filtration rule configured in Wallarm Console](../../admin-en/configure-wallarm-mode.md#general-filtration-rule-in-wallarm-console)
      * [Endpoint-targeted filtration rules configured in Wallarm Console](../../admin-en/configure-wallarm-mode.md#endpoint-targeted-filtration-rules-in-wallarm-console)
2. Eğer beklenen davranış değişen filtreleme modu mantığına uymuyorsa, lütfen [talimatları](../../admin-en/configure-wallarm-mode.md) kullanarak filtreleme modu ayarlarını yayınlanan değişikliklere göre ayarlayın.

## Adım 7: Filtreleme düğümünü Wallarm Cloud'a bağlayın

1. SSH aracılığıyla filtreleme düğümü örneğine bağlanın. Örneklere bağlanma ile ilgili daha ayrıntılı talimatlar bulut platformu dokümantasyonunda mevcuttur:
      * [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstances.html)
      * [GCP documentation](https://cloud.google.com/compute/docs/instances/connecting-to-instance)
2. Yeni bir Wallarm düğümü oluşturun ve bulut platformu talimatlarında belirtildiği şekilde oluşturulan token'ı kullanarak Wallarm Cloud'a bağlayın:
      * [AWS](../../installation/cloud-platforms/aws/ami.md#6-connect-the-instance-to-the-wallarm-cloud)
      * [GCP](../../installation/cloud-platforms/gcp/machine-image.md#5-connect-the-instance-to-the-wallarm-cloud)

## Adım 8: Önceki sürümden filtreleme düğümü ayarlarını yeni sürüme kopyalayın

1. Önceki Wallarm düğüm sürümüne ait aşağıdaki konfigürasyon dosyalarından isteklerin işlenmesi ve proxy işlemleri için ayarları filtreleme düğümü 5.0 dosyalarına kopyalayın:
      * `/etc/nginx/nginx.conf` ve NGINX ayarlarına sahip diğer dosyalar
      * Filtreleme düğümü izleme servisi ayarlarını içeren `/etc/nginx/conf.d/wallarm-status.conf`

        Kopyalanan dosya içeriğinin, [önerilen güvenli konfigürasyon](../../admin-en/configure-statistics-service.md#setup) ile uyumlu olduğundan emin olun.

      * Ortam değişkenlerini içeren `/etc/environment`
      * Son [mimari değişiklikleri](what-is-new.md#optimized-cloud-images) dikkate alınarak, istek işleme ve proxy için diğer özel konfigürasyon dosyaları
1. Konfigürasyon dosyalarında açıkça belirtilmişse, aşağıdaki NGINX yönergelerinin adını değiştirin:
    * `wallarm_instance` → [`wallarm_application`](../../admin-en/configure-parameters-en.md#wallarm_application)
    * `wallarm_local_trainingset_path` → [`wallarm_custom_ruleset_path`](../../admin-en/configure-parameters-en.md#wallarm_custom_ruleset_path)
    * `wallarm_global_trainingset_path` → [`wallarm_protondb_path`](../../admin-en/configure-parameters-en.md#wallarm_protondb_path)
    * `wallarm_ts_request_memory_limit` → [`wallarm_general_ruleset_memory_limit`](../../admin-en/configure-parameters-en.md#wallarm_general_ruleset_memory_limit)

    Sadece yönergelerin adlarını değiştirdik, mantıkları aynı kalmaktadır. Önceki adlarla belirtilen yönergeler yakında kullanım dışı kalacağından, bunları yeniden adlandırmanız önerilir.
1. Eğer [genişletilmiş logging formatı](../../admin-en/configure-logging.md#filter-node-variables) yapılandırıldıysa, lütfen `wallarm_request_time` değişkeninin konfigürasyonda açıkça belirtildiğini kontrol edin.

      Eğer öyleyse, adını `wallarm_request_cpu_time` olarak değiştirin.

      Sadece değişken adını değiştirdik, mantığı aynı kalmaktadır. Eski ad geçici olarak desteklenmekle birlikte, yine de değişkenin yeniden adlandırılması önerilir.
1. Eğer düğüm 2.18 veya daha düşük yükseltiliyorsa, önceki Wallarm düğüm sürümünden 5.0'a [allowlist ve denylist konfigürasyonunu taşıyın](../migrate-ip-lists-to-node-3.md).
1. Engellenen isteklere `&/usr/share/nginx/html/wallarm_blocked.html` sayfası döndürülüyorsa, yeni versiyonunu [kopyalayıp özelleştirin](../../admin-en/configuration-guides/configure-block-page-and-code.md#customizing-sample-blocking-page).

      Yeni düğüm sürümünde, Wallarm örnek engelleme sayfası [değiştirilmiştir](what-is-new.md#new-blocking-page). Sayfadaki logo ve destek e-posta adresi artık varsayılan olarak boş bırakılmaktadır.

NGINX konfigürasyon dosyaları ile çalışma hakkında ayrıntılı bilgi [resmi NGINX dokümantasyonunda](https://nginx.org/docs/beginners_guide.html) mevcuttur.

Filtreleme düğüm yönergelerinin listesi [burada](../../admin-en/configure-parameters-en.md) mevcuttur.

## Adım 8: `overlimit_res` saldırı tespiti konfigürasyonunu yönergelerden 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 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 directives, 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.
1. Configure the rule as done via the NGINX directives:

    * The rule condition should match the NGINX configuration block with the `wallarm_process_time_limit` and `wallarm_process_time_limit_block` directives specified.
    * The time limit for the node to process a single request (milliseconds): the value of `wallarm_process_time_limit`.

        !!! warning "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.
1. Delete the `wallarm_process_time_limit` and `wallarm_process_time_limit_block` NGINX directives from the NGINX configuration file.

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

## Adım 9: NGINX'i yeniden başlatın

Ayarları uygulamak için NGINX'i yeniden başlatın:

```bash
sudo systemctl restart nginx

Adım 10: Wallarm düğüm çalışmasını test edin

  1. Send the request with test [Path Traversal][ptrav-attack-docs] 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][attacks-in-ui-image]

  3. Optionally, [test][link-wallarm-health-check] other aspects of the node functioning.

Adım 11: AWS veya GCP'de filtreleme düğümü 5.0 tabanlı sanal makine görüntüsü oluşturun

Filtreleme düğümü 5.0 tabanlı sanal makine görüntüsünü oluşturmak için, lütfen AWS veya GCP talimatlarını izleyin.

Adım 12: Önceki Wallarm düğüm örneğini silin

Filtreleme düğümünün yeni sürümü başarıyla yapılandırılıp test edildiyse, AWS veya GCP yönetim konsolu kullanarak önceki sürüme ait örnek ve sanal makine görüntüsünü kaldırın.

Adım 13: Threat Replay Testing modülünü yeniden etkinleştirin (sadece düğüm 2.16 veya daha düşük yükseltiliyorsa)

Threat Replay Testing modül kurulumu hakkındaki önerileri öğrenin ve gerekliyse modülü yeniden etkinleştirin.

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