انتقل إلى المحتوى

ترقية وحدات NGINX Wallarm المنتهية الدعم

توضح هذه التعليمات الخطوات لترقية وحدات NGINX Wallarm المنتهية الدعم (الإصدار 3.6 وأقل) إلى الإصدار 4.10. وحدات NGINX Wallarm هي الوحدات المثبتة طبقًا لأحد التعليمات التالية:

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.

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 and general recommendations. Please note that some settings of the latest node are incompatible with the nodes 3.6 and lower.

أبلغ الدعم الفني لـ Wallarm بأنك تقوم بترقية العقدة المنتهية الدعم

إذا كنت تقوم بترقية وحدات NGINX Wallarm المنتهية الدعم (الإصدار 3.6 وأقل) للإصدار 4.10 ، فأبلغ الدعم الفني لـ Wallarm عن ذلك واطلب المساعدة.

بجانب أي مساعدة أخرى ، طلب تمكين منطق القوائم الفرعية الجديدة لحساب Wallarm الخاص بك. عند تمكين منطق القوائم الفرعية الجديدة ، يرجى فتح وحدة تحكم Wallarm والتأكد من أن قسم القوائم الفرعية متاح.

طرق الترقية

You can upgrade in two different ways:

  • Migrate to the all-in-one installer usage during the upgrade procedure. This is the recommended approach as it automates various node installation and upgrade activities, such as NGINX and OS version identification, adding appropriate Wallarm repositories, installing packages, and others.

  • Keep using the current manual installation method via individual DEB/RPM packages. However, it's important to note that in further upgrades this approach will require additional effort and manual configuration in comparison to the new method.

الترقية باستخدام المثبت الشامل

استخدم الإجراء أدناه لترقية وحدات NGINX Wallarm المنتهية الدعم (الإصدار 3.6 وأقل) إلى الإصدار 4.10 باستخدام المثبت الشامل.

متطلبات الترقية باستخدام المثبت الشامل

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

  • Access to https://meganode.wallarm.com to download all-in-one Wallarm installer. Ensure the access is not blocked by a firewall.

  • Access to https://us1.api.wallarm.com for working with US Wallarm Cloud or to https://api.wallarm.com for working with EU Wallarm Cloud. If access can be configured only via the proxy server, then use the instructions.

  • Executing all commands as a superuser (e.g. root).

  • 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 countries, regions, or data centers.

    34.96.64.17
    34.110.183.149
    35.235.66.155
    34.102.90.100
    34.94.156.115
    35.235.115.105
    
    34.160.38.183
    34.144.227.90
    34.90.110.226
    

إجراء الترقية

  • إذا كانت الوحدة النمطية للتصفية والوحدات النمطية لبرنامج postanalytics مثبتة على نفس الخادم ، فيجب اتباع الإرشادات أدناه لترقية الجميع.

    ستحتاج إلى تشغيل العقدة بالإصدار الأحدث باستخدام المثبت الشامل على جهاز نظيف ، واختبار أنه يعمل بشكل جيد وإيقاف السابق وتكوين حركة المرور للتدفق من خلال الجهاز الجديد بدلاً من الجهاز السابق.

  • إذا كانت الوحدة النمطية للتصفية والوحدات النمطية لبرنامج postanalytics مثبتة على خوادم مختلفة ، قم أولاً بترقية وحدة postanalytics وثم الوحدة النمطية للتصفية اتباع هذه الإرشادات.

الخطوة 1: تعطيل وحدة التحقق من التهديد النشط (إذا كنت تقوم بالترقية من العقدة 2.16 أو أقل)

إذا كنت تقوم بترقية Wallarm node 2.16 أو أقل ، فيرجى تعطيل وحدة التحقق من التهديد النشط في وحدة تحكم Wallarm → VulnerabilitiesConfigure.

يمكن أن يتسبب تشغيل الوحدة في الإيجابيات الكاذبة أثناء عملية الترقية. يقلل تعطيل الوحدة من هذا المخاطر.

الخطوة 2: إعداد الجهاز النظيف

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:

  • Debian 10, 11 and 12.x

  • Ubuntu LTS 18.04, 20.04, 22.04

  • CentOS 7, 8 Stream, 9 Stream

  • Alma/Rocky Linux 9

  • RHEL 8.x

  • Oracle Linux 8.x

  • Oracle Linux 9.x

  • Redox

  • SuSe Linux

  • Others (the list is constantly widening, contact Wallarm support team to check if your OS is in the list)

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.

الخطوة 3: تثبيت NGINX والتبعيات

Install the latest NGINX version of:

  • NGINX stable (the latest supported version is v1.28.0) - see how to install it in the NGINX documentation.

  • NGINX Mainline (the latest supported version is v1.27.5) - see how to install it in the NGINX documentation.

  • NGINX Plus (the latest supported version is NGINX Plus R33) - see how to install it in the NGINX documentation.

  • Distribution-Provided NGINX - to install, use the following commands:

    sudo apt update 
    sudo apt -y install --no-install-recommends nginx
    
    sudo apt-get update
    sudo apt-get install nginx
    
    sudo yum -y update 
    sudo yum install -y nginx
    
    sudo yum -y update 
    sudo yum install -y nginx
    
    sudo yum -y update 
    sudo yum install -y nginx
    

الخطوة 4: إعداد رمز Wallarm

To install node, you will need a Wallarm token of the appropriate type. To prepare a 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.
  1. Open Wallarm Console → Nodes in the US Cloud or EU Cloud.
  2. 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.

الخطوة 5: تنزيل برنامج التثبيت Wallarm الشامل

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

  • x86_64

  • ARM64 (beta)

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

curl -O https://meganode.wallarm.com/6.1/wallarm-6.1.0.x86_64-glibc.sh
curl -O https://meganode.wallarm.com/6.1/wallarm-6.1.0.aarch64-glibc.sh

الخطوة 6: تشغيل برنامج التثبيت Wallarm الشامل

وحدة التصفية وبرنامج postanalytics على نفس الخادم

  1. Run downloaded script:

    # If using the x86_64 version:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-6.1.0.x86_64-glibc.sh
    
    # If using the ARM64 version:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-6.1.0.aarch64-glibc.sh
    

    The WALLARM_LABELS variable 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.1.0.x86_64-glibc.sh
    
    # If using the ARM64 version:
    sudo sh wallarm-6.1.0.aarch64-glibc.sh
    
  2. Select US Cloud or EU Cloud.

  3. Enter Wallarm token.

وحدة التصفية وبرنامج postanalytics على خوادم مختلفة

تسلسل الخطوات لتحديث وحدات التصفية وبرامج postanalytics

إذا كانت وحدة التصفية ووحدات postanalytics مثبتة على خوادم مختلفة ، فيجب تحديث حزم postanalytics قبل تحديث حزم وحده التصفية.

  1. قم بترقية وحدة postanalytics باتباع هذه الإرشادات.

  2. قم بترقية وحدة التصفية:

    # إذا كنت تستخدم الإصدار x86_64:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-4.10.2.x86_64-glibc.sh filtering
    
    # إذا كنت تستخدم الإصدار ARM64:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-4.10.2.aarch64-glibc.sh filtering
    

    تعرض متغير WALLARM_LABELS المجموعة التي ستتم إضافة العقدة إليها (يستخدم لتجميع العقد بشكل منطقي في واجهة المستخدم لوحدة تحكم Wallarm).

    # إذا كنت تستخدم الإصدار x86_64:
    sudo sh wallarm-4.10.2.x86_64-glibc.sh filtering
    
    # إذا كنت تستخدم الإصدار ARM64:
    sudo sh wallarm-4.10.2.aarch64-glibc.sh filtering
    

الخطوة 7: ترحيل القوائم الفرعية السماح والرفض من إصدار Wallarm node السابق إلى 4.10 (فقط إذا كانت العقدة قديمة 2.18 أو أقل)

إذا كنت تقوم بترقية العقدة 2.18 أو أقل ، قم بالترحيل تكوين القائمة الفرعية السماح والقائمة الفارعية الرفض من إصدار Wallarm node السابق إلى الإصدار الأخير.

الخطوة 8: نقل تكوين NGINX وبرنامج postanalytics من الجهاز القديم للعقدة إلى الجديد

قم بنقل تكوين NGINX المتعلق بالعقدة وتكوين postanalytics من ملفات التكوين على الجهاز القديم إلى ملفات على الجهاز الجديد. يمكنك القيام بذلك عن طريق نسخ التوجيهات المطلوبة.

الملفات المصدر

على الجهاز القديم ، حسب نظام التشغيل وإصدار NGINX ، قد يكون موقع ملفات التكوين لـ NGINX في مجلدات مختلفة وله أسماء مختلفة. الأمثلة الأكثر شيوعًا هي التالية:

  • /etc/nginx/conf.d/default.conf مع إعدادات NGINX

  • /etc/nginx/conf.d/wallarm-status.conf مع إعدادات مراقبة Wallarm node. الوصف التفصيلي متاح ضمنالرابط

كما يتم عادة تكوين وحدة postanalytics (إعدادات قاعدة البيانات Tarantool) هنا:

  • /etc/default/wallarm-tarantool أو

  • /etc/sysconfig/wallarm-tarantool

الملفات الهدف

بما أن المثبت الشامل يعمل مع مجموعات مختلفة من نظام التشغيل وإصدارات NGINX ، على الجهاز الجديد الخاص بك ، قد تكون الملفات الهدف بها أسماء مختلفة وتقع في مجلدات مختلفة.

عند نقل التهيئة ، تحتاج إلى تنفيذ الخطوات المدرجة أدناه.

إعادة تسمية التوجيهات المكررة لـ NGINX

أعد تسمية التوجيهات NGINX التالية إذا تم تحديدها بشكل صريح في ملفات التكوين:

لقد قمنا فقط بتغيير أسماء التوجيهات ، ومع ذلك فإن المنطق الخاص بهم لا يزال هو نفسه. سيتم إزالة التوجيهات بأسماء سابقة قريبًا ، لذا يوصى بتغييرها قبل ذلك.

تحديث متغيرات تسجيل العقدة

تم تنفيذ التغييرات التالية على متغيرات تسجيل العقدة في الإصدار الجديد للعقدة:

  • تمت إعادة تسمية المتغير wallarm_request_time إلى wallarm_request_cpu_time.

    نحن فقط قمنا بتغيير اسم المتغير ، ولكن معناه لا يزال هو نفسه. يتم دعم الاسم القديم مؤقتًا أيضًا ، ولكن يوصى بتغيير المتغير.

  • تمت إضافة المتغير wallarm_request_mono_time ـ ضعه في تكوين تنسيق التسجيل إذا كنت بحاجة إلى معلومات التسجيل حول الوقت الكلي الذي يكون مجموع:

    • الوقت في الطابور
    • الوقت بثواني قضاها المعالج في معالجة الطلب

ضبط إعدادات وضع التصفية للعقدة Wallarm لتطبيق التغييرات المحدثة في الإصدارات الأحدث

  1. تأكد من أن السلوك المتوقع للإعدادات المدرجة أدناه يتوافق مع المنطق المتغير لأوضاع التصفية off و monitoring:

  2. إذا لم يتوافق السلوك المتوقع مع المنطق المعدل للوضع التصفية ، فيرجى ضبط إعدادات وضع التصفية لتطبيق التغييرات المحدثة باستخدام التعليمات.

الخطوة 9: إعداد نقل العقدة المنتهية الدعم إلى جهاز جديد

إذا كانت العقدة المنتهية الدعم ومكون postanalytics مثبتين على نفس الخادم ، فيجب اتباع الإرشادات أدناه لترقية الكل.

ستحتاج إلى تشغيل العقدة بالإصدار الأحدث باستخدام المثبت الشامل على جهاز نظيف ، واختبار أنه يعمل بشكل جيد وإيقاف السابق وتكوين حركة المرور للتدفق من خلال الجهاز الجديد بدلاً من الجهاز السابق.

الخطوة 10: انشاء رمز تعريف wallarm

To install node, you will need a Wallarm token of the appropriate type. To prepare a 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.
  1. Open Wallarm Console → Nodes in the US Cloud or EU Cloud.
  2. 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.

الخطوة 11: تنزيل مثبت Wallarm الشامل

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

  • x86_64

  • ARM64 (beta)

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

curl -O https://meganode.wallarm.com/6.1/wallarm-6.1.0.x86_64-glibc.sh
curl -O https://meganode.wallarm.com/6.1/wallarm-6.1.0.aarch64-glibc.sh

الخطوة 12: تشغيل مثبت wallarm الشامل

استخدم هذا الرمز في حالة تشغيل العقدة وpostanalytics على الخادم نفسه

  1. Run downloaded script:

    # If using the x86_64 version:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-6.1.0.x86_64-glibc.sh
    
    # If using the ARM64 version:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-6.1.0.aarch64-glibc.sh
    

    The WALLARM_LABELS variable 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.1.0.x86_64-glibc.sh
    
    # If using the ARM64 version:
    sudo sh wallarm-6.1.0.aarch64-glibc.sh
    
  2. Select US Cloud or EU Cloud.

  3. Enter Wallarm token.


اذا كانت الوحدة النمطية للتصفية و الوحدة النمطية للبرنامج postanalytics مثبته على خوادم مختلفة فيجب اتباع الخطوات

متسلسلة الخطوات لترقية وحدة التصفية و الوحدات النمطية للبرنامج postanalytics

إذا كانت وحدة التصفية ووحدات postanalytics مثبته على خوادم مختلفة ثم يتطلب تحديث وحدة برنامج postanalytics قبل تحديث حزم وحده التصفية

  1. ترقية وحدة postanalytics من الخلال الإرشادات الموجودة في الصفحة .
  2. ترقية وحدة التصفية:

    # If using the x86_64 version:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-4.10.2.x86_64-glibc.sh filtering
    
    # If using the ARM64 version:
    sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-4.10.2.aarch64-glibc.sh filtering
    

المتغير WALLARM_LABELS هو لتحديد المجموعة التي ستتم اظافة العقده اليها (يستخدم لتجميع العقد في واجهة المستخدم لوحده التحكم Wallarm).

=== "Node token"

```bash

If using the x86_64 version:

sudo sh wallarm-4.10.2.x86_64-glibc.sh filtering

If using the ARM64 version:

sudo sh wallarm-4.10.2.aarch64-glibc.sh filtering
```

الخطوة 13: نقل قوائم الأرقام الفرعية المسموح بها و المرفوضة من الإصدار السابق للعقدة الى 4.10 ( إذا كان الإصدار الاقدم من العقدة هو 2.18 أو أقل )

إذا كنت تقوم بترقية العقدة 2.18 أو أقل ، قم بالترحيل (../migrate-ip-lists-to-node-3.md) الإعدادت القائمة الفرعية المدرجة في قائمة السماح و القائمة الفرعية المدرجة في الرفض من أصدار العقدة الاقدم إلى أحدث إصدار.

الخطوة 14: نقل التكوينات الموجودة على العقدة القديمة على الماكينة القديمة الى الماكينة الجديدة

قم بنقل تكوينات NGINX االمتعلقة بوحده التصفية وتكوينات postanalytics من ملفات التكوين القديمة الموجوده على الجوال القديم الى الملفات الموجوده على الجهاز الجديد . يمكنك القيام بذلك عن طريق نسخ التعليمات المطلوبة.

الملفات المصدر

على الجهاز القديم ، حسب نظام التشغيل والإصدار NGINX ، قد يكون موقع ملفات تكوين NGINX في أماكن مختلفة ولها أسماء مختلفة. والأكثر شيوعًا هي:

  • /etc/nginx/conf.d/default.conf مع إعدادات NGINX

  • /etc/nginx/conf.d/wallarm-status.conf مع إعدادات رصد وحده Wallarm. و الوصف التفصيلية متوفر في الخلال الرابط

تكوين وحدة postanalyticst بشكل عام يتم على النظام (اعدادات قاعدة بيانات Tarantool ):

  • /etc/default/wallarm-tarantool أو

  • /etc/sysconfig/wallarm-tarantool

الملفات الهدف

بما أن المثبت الشامل يعمل مع مجموعة مختلفة من أنظمة التشغيل وإصدارا