docs(setup): make fail2ban opt-in in 70-hardening.sh #222
Reference in New Issue
Block a user
Delete Branch "docs/setup-fail2ban-optional"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Follow-up on #220 / #221. Makes fail2ban opt-in in
70-hardening.shinstead of installing it unconditionally.Reasoning: some corp environments already ship brute-force protection at the network layer (ACL / corp firewall / appliance) — fail2ban on the host then becomes redundant and can be the wrong layer to debug from when a rule misfires. The other three hardening steps (UFW enable, sshd lockdown) were already prompt-gated; fail2ban was the odd one out.
What lands
docs/setup/scripts/70-hardening.sh↪ skip (user choice)so re-runs don't repeatedly nag if the dev has already declined.docs/setup/01-dev-debian-vm-setup.md70-hardening.shclarified — each sub-step's prompt posture is now visible: UFW prompts before enabling, fail2ban prompts before installing, sshd hardening prompts before applying.unattended-upgradesis the only one applied unconditionally.docs/setup/README.mdTest plan
70-hardening.sh, decline the fail2ban prompt → script continues, fail2ban not installed, no service started.70-hardening.sh→ the fail2ban branch prompts again (the dev may have changed their mind); declining again produces the same↪ skip (user choice)result.pnpm exec prettier --checkclean on the touched files.bash -n docs/setup/scripts/70-hardening.sh(syntax check) clean.