fix(fail2ban): use ProtectSystem=full so ufw can create its lock file
strict makes /run read-only, which blocks ufw's /run/ufw.lock and cannot be whitelisted via ReadWritePaths (the file does not exist). full still protects /usr and /etc while leaving /run and /var writable, so only /etc/ufw needs an explicit write path.
This commit is contained in:
@@ -10,7 +10,7 @@ Bans brute-force sources via UFW. Reads logs from the systemd journal (`backend
|
||||
## Notes
|
||||
|
||||
- Logs to the journal (`logtarget = STDOUT` in `fail2ban.local`) — see `journalctl -u fail2ban`.
|
||||
- The systemd unit is hardened (`ProtectSystem=strict`); the drop-in lives at `/etc/systemd/system/fail2ban.service.d/override.conf` and is fully managed by the role.
|
||||
- The systemd unit is hardened (`ProtectSystem=full`); the drop-in lives at `/etc/systemd/system/fail2ban.service.d/override.conf` and is fully managed by the role.
|
||||
- Firewall/banaction is UFW on every host; jails ban via `ufw prepend reject`.
|
||||
|
||||
## Variables
|
||||
|
||||
Reference in New Issue
Block a user