Linux (Debian, Ubuntu)
The commands for Debian and Ubuntu: prepare the system, run the one-line installer, open the ufw firewall, check the services, upgrade and uninstall.
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
- Debian 11 and later, Ubuntu 20.04 and later, amd64 and arm64. systemd 239 or newer and glibc 2.28 or newer are needed.
- The installer adds missing prerequisites (curl, tar, libcap), creates an unprivileged user and installs the hardened systemd services toutwaf-dp (ports 80 and 443) and toutwaf-cp (console, port 9443).
- If ufw is active it opens 80 and 443 and the console port 9443 (restrict it to your admin network with --console-from). Port 9444 is never opened automatically.
- SELinux is not used by default on Debian and Ubuntu and no AppArmor profile is shipped: the systemd sandbox is the confinement.
The commands, step by step
Voraussetzungen installieren (apt)
sudo apt update && sudo apt -y upgrade
sudo apt -y install curl tar ca-certificates ufwMit 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.
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bashLieber das Skript zuerst lesen?
Herunterladen, prüfen, dann ausführen. Empfohlen für Produktionsserver.
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh -o install.sh
less install.sh
sudo bash install.shInstaller-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.
# 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 devFirewall öffnen (ufw)
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.
sudo ufw allow 80,443/tcp
sudo ufw allow from 203.0.113.0/24 to any port 9443 proto tcp
sudo ufw --force enable
sudo ufw statusDienste verwalten
Beide Dienste starten beim Booten. Mit diesen Befehlen starten, stoppen oder neu starten Sie sie.
sudo systemctl enable --now toutwaf-cp toutwaf-dp
sudo systemctl restart toutwaf-cp toutwaf-dp
sudo systemctl stop toutwaf-dp toutwaf-cpDienste prüfen
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-pagerAktualisieren
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.
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/healthzDeinstallieren
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.
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 on that version; it has not been tried on a clean real machine.
- No stable version exists yet: the public version is the development version 0.3.0-dev.