DE
EUR
Gratis-EditionKostenlos Installieren

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.

All ways to install

Welche Version Sie installieren

Die öffentliche Version ist eine Entwicklungsversion mit dem Namen 0.3.0-dev. Ihr Name bleibt gleich: Jede Veröffentlichung ersetzt die vorherige, und eine Build-Kennung unterscheidet zwei Builds. Eine stabile Version gibt es noch nicht: Sie wird erst veröffentlicht, wenn jedes System und jedes Paket durchgängig getestet wurde. Die Befehle auf dieser Seite installieren deshalb aus dem Kanal dev. Eine Entwicklungsversion kann Fehler enthalten: Probieren Sie sie auf einer Test-Site aus, bevor Sie sich darauf verlassen.

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

System aktualisieren und Voraussetzungen installieren

bash
sudo dnf -y update
sudo dnf -y install curl tar ca-certificates firewalld policycoreutils-python-utils

Mit dem Einzeiler-Installer installieren

Das Skript lädt die nativen Binaries für Ihre Architektur herunter, legt einen dedizierten unprivilegierten Benutzer an und installiert die gehärteten systemd-Dienste toutwaf-dp (Data Plane, Ports 80 und 443) und toutwaf-cp (Control Plane und Konsole, Port 9443). Anschließend zeigt es Ihre Erstanmeldedaten an.

bash
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bash

Lieber das Skript zuerst lesen?

Herunterladen, prüfen, dann ausführen. Empfohlen für Produktionsserver.

bash
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh -o install.sh
less install.sh
sudo bash install.sh

Installer-Optionen

Eine neue Installation liegt in einem einzigen Verzeichnis, /var/toutwaf (bin, conf, data und logs; änderbar mit --home DIR oder TOUTWAF_HOME), und die Kommandozeilenwerkzeuge werden nach /usr/local/bin verlinkt. Eine ältere Installation behält ihre eigenen Pfade (/etc/toutwaf, /var/lib/toutwaf) und wird nie verschoben.

options
# 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

Firewall öffnen

Der Installer öffnet diese Ports standardmäßig, wenn firewalld oder ufw aktiv ist: 80 und 443 sowie den Konsolenport 9443 (mit --console-from auf Ihr Admin-Netz beschränken). Der Agent-Port 9444 wird nie öffentlich geöffnet. Diese Befehle brauchen Sie nur mit --no-firewall, bei einer anderen Firewall oder für die manuelle Einrichtung.

firewalld
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-all

SELinux

Lassen Sie SELinux im Enforcing-Modus. Beschriften Sie die ToutWAF-Verzeichnisse und achten Sie darauf, dass keine AVC-Ablehnung protokolliert wird.

selinux
getenforce
sudo restorecon -Rv /var/toutwaf
sudo ausearch -m avc -ts recent

Dienste verwalten

Beide Dienste starten beim Booten. Mit diesen Befehlen starten, stoppen oder neu starten Sie sie.

systemd
sudo systemctl enable --now toutwaf-cp toutwaf-dp
sudo systemctl restart toutwaf-cp toutwaf-dp
sudo systemctl stop toutwaf-dp toutwaf-cp

Dienste prüfen

bash
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

Aktualisieren

Konfiguration und Daten sichern und den Installer erneut ausführen: Er behält Ihre Einstellungen und macht selbst ein Rollback, wenn die neue Version nicht gesund startet. Die gezeigten Pfade gelten für eine neue Installation (/var/toutwaf); eine ältere Installation behält /etc/toutwaf und /var/lib/toutwaf. Sie können auch in der Konsole auf der Seite Updates aktualisieren.

bash
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

Deinstallieren

Der erste Block entfernt die Dienste, die Binaries und die von ToutWAF angelegten Firewall-Regeln und behält Ihre Daten. Der zweite löscht zusätzlich Konfiguration, Daten und Logs.

bash
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh -o install.sh
sudo bash install.sh --uninstall
purge
sudo bash install.sh --uninstall --purge

What 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.

Other ways to install

Learn more in the documentation