ترقية وحدة postanalytics المنتهية الصلاحية¶
توصف هذه التعليمات الخطوات اللازمة لترقية وحدة postanalytics المنتهية الصلاحية (الإصدار 3.6 وأقل) المثبتة على خادم منفصل. يجب ترقية وحدة postanalytics قبل ترقية وحدات 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.
طرق الترقية¶
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.
الترقية باستخدام المثبت الشامل¶
استخدم الإجراء أدناه لترقية وحدة postanalytics المنتهية الصلاحية (الإصدار 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 tohttps://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.
الخطوة 1: إعداد الجهاز المستقيم¶
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.
الخطوة 2: إعداد الرمز المميز لـWallarm¶
To install node, you will need a Wallarm token of the appropriate type. To prepare a token:
الخطوة 3: تحميل مثبت 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:
الخطوة 4: تشغيل مثبت Wallarm الشامل لتثبيت postanalytics¶
To install postanalytics separately with all-in-one installer, use:
# If using the x86_64 version:
sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-6.1.0.x86_64-glibc.sh postanalytics
# If using the ARM64 version:
sudo env WALLARM_LABELS='group=<GROUP>' sh wallarm-6.1.0.aarch64-glibc.sh postanalytics
The WALLARM_LABELS
variable sets group into which the node will be added (used for logical grouping of nodes in the Wallarm Console UI).
الخطوة 5: تحديث منفذ API¶
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.
الخطوة 6: ترقية وحدة NGINX-Wallarm على خادم منفصل¶
بمجرد تثبيت وحدة postanalytics على الخادم المستقل، قم بترقية وحدتها المتصلة NGINX-Wallarm التي تعمل على خادم مختلف.
جمع طرق الترقية
يمكن استخدام الطرق اليدوية والآلية لترقية وحدة NGINX-Wallarm المتصلة.
الخطوة 7: إعادة توصيل وحدة NGINX-Wallarm بوحدة postanalytics¶
On the machine with the NGINX-Wallarm module, in the NGINX configuration file, specify the postanalytics module server address:
upstream wallarm_tarantool {
server <ip1>:3313 max_fails=0 fail_timeout=0 max_conns=1;
server <ip2>:3313 max_fails=0 fail_timeout=0 max_conns=1;
keepalive 2;
}
# omitted
wallarm_tarantool_upstream wallarm_tarantool;
-
max_conns
value must be specified for each of the upstream Tarantool servers to prevent the creation of excessive connections. -
keepalive
value must not be lower than the number of the Tarantool servers. -
The
# wallarm_tarantool_upstream wallarm_tarantool;
string is commented by default - please delete#
.
Once the configuration file changed, restart NGINX/NGINX Plus on the NGINX-Wallarm module server:
الخطوة 8: تحقق من تفاعل وحدات NGINX‑Wallarm وpostanalytics المستقلة¶
To check the NGINX‑Wallarm and separate postanalytics modules interaction, you can send the request with test attack to the address of the protected application:
If the NGINX‑Wallarm and separate postanalytics modules are configured properly, the attack will be uploaded to the Wallarm Cloud and displayed in the Attacks section of Wallarm Console:
If the attack was not uploaded to the Cloud, please check that there are no errors in the services operation:
-
Analyze the postanalytics module logs
If there is the record like
SystemError binary: failed to bind: Cannot assign requested address
, make sure that the server accepts connection on specified address and port. -
On the server with the NGINX‑Wallarm module, analyze the NGINX logs:
If there is the record like
[error] wallarm: <address> connect() failed
, make sure that the address of separate postanalytics module is specified correctly in the NGINX‑Wallarm module configuration files and separate postanalytics server accepts connection on specified address and port. -
On the server with the NGINX‑Wallarm module, get the statistics on processed requests using the command below and make sure that the value of
tnt_errors
is 0Description of all parameters returned by the statistics service →
الخطوة 9: إزالة وحدة postanalytics القديمة¶
-
Delete old postanalytics module in Wallarm Console → Nodes by selecting your postanalytics module node and clicking Delete.
-
Confirm the action.
When the postanalytics module node is deleted from Cloud, it will stop participation in filtration of requests to your applications. Deleting cannot be undone. The postanalytics module node will be deleted from the list of nodes permanently.
-
Delete machine with the old postanalytics module or just clean it from Wallarm postanalytics module components:
الترقية اليدوية¶
استخدم الإجراء أدناه لترقية وحدة postanalytics المنتهية الصلاحية (الإصدار 3.6 وأقل) المثبتة على خادم منفصل إلى الإصدار 4.8 يدويًا.
متطلبات¶
-
الوصول إلى الحساب بدور المدير في واجهة Wallarm عبر السحابة الأمريكية أو السحابة الأوروبية
-
الوصول إلى
https://us1.api.wallarm.com
عند العمل مع سحابة Wallarm الأمريكية أو إلىhttps://api.wallarm.com
عند العمل مع سحابة Wallarm الأوروبية. يُرجى التأكد من عدم حجب الوصول بواسطة جدار الحماية
الخطوة 1: تحديث منفذ API¶
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.
الخطوة 2: إضافة مستودع Wallarm الجديد¶
قم بحذف عنوان مستودع Wallarm السابق وأضف مستودعًا بحزمة نسخة العقدة Wallarm الجديدة. يرجى استخدام الأوامر المناسبة للمنصة المتوافقة.
CentOS و Amazon Linux 2.0.2021x وأقل
تم إيقاف الدعم لـ CentOS 8.x
تم إيقاف الدعم لـ CentOS 8.x تم إيقاف الدعم. يمكنك تثبيت عقدة Wallarm على نظام التشغيل AlmaLinux, Rocky Linux, Oracle Linux 8.x, أو RHEL 8.x بدلاً من ذلك.
Debian و Ubuntu
-
افتح الملف الذي يحتوي على عنوان المستودع Wallarm في المحرر النصي المثبت. في هذه التعليمات، سيتم استخدام vim.
-
قم بتعليق العنوان السابق للمستودع أو حذفه.
-
أضف عنوان مستودع جديد:
غير مدعوم من قبل النسخة الثابتة من NGINX و NGINX Plus
النسخ الرسمية من NGINX (ثابتة و Plus) و، كنتيجة لذلك، لا يمكن تثبيت وحدة Wallarm 4.4 وما فوق على Debian 10.x (buster). يرجى استخدام هذا النظام التشغيل فقط في حالة تثبيت NGINX من مستودعات Debian/CentOS.
الخطوة 3: ترقية حزم Tarantool¶
The error "signatures couldn't be verified"
If added GPG keys expired, the following error would be returned:
W: GPG error: https://repo.wallarm.com/ubuntu/wallarm-node focal/4.8/ Release:The following
signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
E: The repository 'https://repo.wallarm.com/ubuntu/wallarm-node focal/4.8/ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:
Upgrading Wallarm dependencies
The sudo apt dist-upgrade
command upgrades both the Wallarm packages and filtering node dependencies. It is the recommended upgrade option providing correct operation of the newer filtering node version.
The error "signatures couldn't be verified"
If added GPG keys expired, the following error would be returned:
W: GPG error: https://repo.wallarm.com/ubuntu/wallarm-node focal/4.8/ Release:The following
signatures couldn't be verified because the public key is not available: NO_PUBKEY 1111FQQW999
E: The repository 'https://repo.wallarm.com/ubuntu/wallarm-node focal/4.8/ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
To fix the problem, please import new GPG keys for the Wallarm packages and then upgrade the packages using the following commands:
Upgrading Wallarm dependencies
The sudo apt dist-upgrade
command upgrades both the Wallarm packages and filtering node dependencies. It is the recommended upgrade option providing correct operation of the newer filtering node version.
الخطوة 4: تحديث نوع العقدة¶
تحتوي العقدة postanalytics المنشورة 3.6 أو أقل على النوع المهجور العادي الذي تم الآن استبداله بنوع عقدة Wallarm الجديد.
يوصى بتثبيت النوع الجديد بدلاً من النوع المهجور أثناء الترحيل إلى الإصدار 4.8. سيتم إزالة نوع العقدة العادي في الإصدارات المستقبلية، يرجى الترحيل قبل ذلك.
لاستبدال العقدة postanalytics العادية بعقدة Wallarm:
-
افتح Wallarm Console → عقد في السحابة الأمريكية أو السحابة الأوروبية وأنشئ عقدة من نوع عقدة Wallarm.
-
انسخ الرمز المميز المُنشأ.
-
نفذ البرنامج النصي
register-node
لتشغيل عقدة Wallarm:<TOKEN>
هو القيمة المنسوخة لرمز العقدة أو رمز API بدورالتنفيذ
.- الخيار
--force
يجبر على إعادة كتابة بيانات الاعتماد للوصول إلى Wallarm Cloud المحددة في ملف/etc/wallarm/node.yaml
.