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.
Welke versie u installeert
De openbare versie is een ontwikkelversie met de naam 0.3.0-dev. De naam blijft gelijk: elke publicatie vervangt de vorige en een build-id onderscheidt twee builds. Er bestaat nog geen stabiele versie: die wordt pas gepubliceerd als elk systeem en elk pakket van begin tot eind is getest. De opdrachten op deze pagina installeren daarom vanuit het kanaal dev. Een ontwikkelversie kan fouten bevatten: probeer haar eerst op een testsite voordat u erop vertrouwt.
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
Werk het systeem bij en installeer de vereisten
sudo dnf -y update
sudo dnf -y install curl tar ca-certificates firewalld policycoreutils-python-utilsInstalleer met de one-line installer
Het script downloadt de native binaries voor uw architectuur, maakt een eigen gebruiker zonder privileges aan en installeert de geharde systemd-services toutwaf-dp (data plane, poorten 80 en 443) en toutwaf-cp (control plane en console, poort 9443). Daarna toont het uw eerste inloggegevens.
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh | sudo bashLiever eerst het script lezen?
Download het, bekijk het en voer het daarna uit. Aanbevolen voor productieservers.
curl -fsSL https://repo.qu3ntin.com/toutwaf/toutwaf/-/raw/dev/install.sh -o install.sh
less install.sh
sudo bash install.shOpties van het installatieprogramma
Een nieuwe installatie staat in één map, /var/toutwaf (bin, conf, data en logs; wijzig dit met --home DIR of TOUTWAF_HOME), en de opdrachtregelhulpmiddelen worden gelinkt in /usr/local/bin. Een eerdere installatie houdt haar eigen paden (/etc/toutwaf, /var/lib/toutwaf) en wordt nooit verplaatst.
# 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 devOpen de firewall
Het installatieprogramma opent deze poorten standaard wanneer firewalld of ufw actief is: 80 en 443, en de consolepoort 9443 (beperk die tot uw beheernetwerk met --console-from). De agentpoort 9444 wordt nooit publiek geopend. Deze commando's zijn alleen nodig met --no-firewall, bij een andere firewall of om het handmatig te doen.
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
Houd SELinux op enforcing. Label de ToutWAF-mappen en controleer dat er geen AVC-weigering wordt gelogd.
getenforce
sudo restorecon -Rv /var/toutwaf
sudo ausearch -m avc -ts recentBeheer de services
Beide services starten bij het opstarten. Gebruik deze commando's om ze te starten, stoppen of herstarten.
sudo systemctl enable --now toutwaf-cp toutwaf-dp
sudo systemctl restart toutwaf-cp toutwaf-dp
sudo systemctl stop toutwaf-dp toutwaf-cpControleer de services
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-pagerUpgraden
Maak een back-up van de configuratie en de data en voer het installatieprogramma opnieuw uit: het behoudt uw instellingen en draait zelf terug als de nieuwe versie niet gezond wordt. De getoonde paden zijn die van een nieuwe installatie (/var/toutwaf); een oudere installatie houdt /etc/toutwaf en /var/lib/toutwaf. U kunt ook bijwerken vanuit de console, op de pagina Updates.
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/healthzVerwijderen
Het eerste blok verwijdert de services, de binaries en de door ToutWAF toegevoegde firewallregels en bewaart uw data. Het tweede wist ook configuratie, data en 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; 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.