Red Hat, Rocky, Alma
The commands for AlmaLinux, Rocky Linux, RHEL and Oracle Linux 8 to 10: prerequisites, installer, firewalld, SELinux in enforcing mode, check, upgrade and uninstall.
أي إصدار ستثبّت
الإصدار العام هو إصدار تطوير باسم 0.3.0-dev. يبقى اسمه ثابتاً: كل نشر يحلّ محل السابق، ويميّز معرّف البناء بين بنائين. لا يوجد إصدار مستقر بعد: لن يُنشر إلا بعد اختبار كل نظام وكل حزمة من البداية إلى النهاية. لذلك تثبّت الأوامر في هذه الصفحة من قناة dev. قد يحتوي إصدار التطوير على أخطاء: جرّبه على موقع اختبار قبل أن تعتمد عليه.
At a glance
- AlmaLinux, Rocky Linux, Oracle Linux and RHEL 8, 9 and 10 use the same installer and the same steps. It detects the family in /etc/os-release and refuses a version below 8.
- Keep SELinux enforcing: the installer labels the binaries, configuration, data and logs, labels ports 9443 and 9444 and turns on the httpd_can_network_connect boolean.
- firewalld is the default firewall: open 80 and 443, and port 9443 for your admin network only.
- No subscription is needed for ToutWAF itself, but dnf needs access to BaseOS and AppStream to install the prerequisites; on an isolated host, use the offline procedure.
The commands, step by step
حدّث النظام وثبّت المتطلبات الأساسية
sudo dnf -y update
sudo dnf -y install curl tar ca-certificates firewalld policycoreutils-python-utilsثبّت باستخدام المثبّت ذي السطر الواحد
ينزّل السكربت الملفات التنفيذية الأصلية المناسبة لمعماريتك، وينشئ مستخدماً مخصصاً بلا امتيازات، ويثبّت خدمتي systemd المحصّنتين toutwaf-dp (مستوى البيانات، المنفذان 80 و443) وtoutwaf-cp (مستوى التحكم ووحدة التحكم، المنفذ 9443)، ثم يطبع بيانات تسجيل الدخول الأول.
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bashتفضّل قراءة السكربت أولاً؟
نزّله وراجعه ثم شغّله. موصى به لخوادم الإنتاج.
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh -o install.sh
less install.sh
sudo bash install.shخيارات المثبّت
يقيم التثبيت الجديد في مجلد رئيسي واحد هو /var/toutwaf (يضم bin وconf وdata وlogs؛ غيّره عبر --home DIR أو TOUTWAF_HOME)، وتُربط أدوات سطر الأوامر في /usr/local/bin. أما التثبيت الأقدم فيحتفظ بمساراته (/etc/toutwaf و/var/lib/toutwaf) ولا يُنقل أبداً.
# only let your admin network reach the console (port 9443)
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bash -s -- --console-from 203.0.113.0/24
# do not touch the host firewall / choose the installation home
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bash -s -- --no-firewall
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bash -s -- --home /opt/toutwaf
# name the channel explicitly (the installer of the dev branch already takes the dev channel; no stable version exists yet)
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bash -s -- --channel devافتح جدار الحماية
يفتح المثبّت هذه المنافذ افتراضياً عندما يكون firewalld أو ufw نشطاً: 80 و443، ومنفذ لوحة التحكم 9443 (قيّده بشبكة الإدارة لديك عبر --console-from). أما منفذ الوكلاء 9444 فلا يُفتح للعموم أبداً. لا تحتاج إلى هذه الأوامر إلا مع --no-firewall أو مع جدار حماية آخر أو لإجراء ذلك يدوياً.
sudo systemctl enable --now firewalld
sudo firewall-cmd --permanent --add-service=http --add-service=https
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.0/24" port port="9443" protocol="tcp" accept'
sudo firewall-cmd --reload
sudo firewall-cmd --list-allSELinux
أبقِ SELinux في وضع enforcing. ضع الوسوم على أدلة ToutWAF وتأكد من عدم تسجيل أي رفض AVC.
getenforce
sudo restorecon -Rv /var/toutwaf
sudo ausearch -m avc -ts recentإدارة الخدمات
تبدأ الخدمتان عند الإقلاع. استخدم هذه الأوامر لتشغيلهما أو إيقافهما أو إعادة تشغيلهما.
sudo systemctl enable --now toutwaf-cp toutwaf-dp
sudo systemctl restart toutwaf-cp toutwaf-dp
sudo systemctl stop toutwaf-dp toutwaf-cpتحقق من الخدمات
sudo systemctl status toutwaf-cp toutwaf-dp --no-pager
toutwafctl doctor
curl -kI https://127.0.0.1:9443/
curl -s http://127.0.0.1:9101/healthz
sudo journalctl -u toutwaf-dp -u toutwaf-cp -n 50 --no-pagerالترقية
خذ نسخة احتياطية من الإعدادات والبيانات ثم شغّل المثبّت من جديد: يحتفظ بإعداداتك ويتراجع تلقائياً إذا لم يصبح الإصدار الجديد سليماً. المسارات المعروضة هي مسارات تثبيت جديد (/var/toutwaf)؛ أما التثبيت الأقدم فيحتفظ بـ /etc/toutwaf و/var/lib/toutwaf. يمكنك أيضاً التحديث من اللوحة عبر صفحة التحديثات.
sudo mkdir -p /var/toutwaf.bak
sudo cp -a /var/toutwaf/conf /var/toutwaf/data /var/toutwaf.bak/
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bash -s -- --update --yes
curl -s http://127.0.0.1:9101/healthzإلغاء التثبيت
تزيل الكتلة الأولى الخدمات والملفات التنفيذية وقواعد جدار الحماية التي أضافها ToutWAF وتُبقي بياناتك. وتحذف الثانية أيضاً الإعدادات والبيانات والسجلات.
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh -o install.sh
sudo bash install.sh --uninstallsudo bash install.sh --uninstall --purgeWhat is not verified
We prefer to say it plainly.
- “Tested” means the full installation passed in a container with systemd; real SELinux enforcement was not exercised, and RHEL was validated on Red Hat UBI images.
- No stable version exists yet: the public version is the development version 0.3.0-dev.