ModSecurity is an open-source Web Application Firewall running as an Apache or Nginx module.
Install on Ubuntu/Apache
sudo apt install -y libapache2-mod-security2
sudo a2enmod security2
sudo systemctl restart apache2
⚠️ Start in DetectionOnly mode for 2–4 weeks, study the logs, then switch to active blocking.