Hardening a Server in Two Steps: Fail2ban for the Host, SafeLine for the App
Description and use
The server is protected from SSH brute force and web attacks using Fail2ban and SafeLine.
Problem
Attackers target both the host (SSH brute force) and the web application (SQLi, XSS, bots).
Outcome
The server is hardened against SSH brute force and web application attacks with minimal configuration.
Workflow
- Install Fail2ban via package manager and enable service
- Verify sshd jail is active
- Install SafeLine WAF using provided script
- Configure SafeLine to proxy traffic to the web app
- Test a malicious payload to confirm it is blocked
- Review logs for bans and blocks
Evidence
Fail2ban watches your service logs and bans IPs that show hostile behavior — most usefully, repeated failed SSH logins.
SafeLine is a self-hosted WAF that runs as a reverse proxy and inspects every HTTP request.
- Record date: 2026-10-09T08:41:07.031Z