Files
server_init_harden/init-linux-harden.sh
Pratik Tripathy 202ef6a648 feat(firewalld,freebds+fail2ban):
- Linux: ufw -> firewalld
- installations: separate install list for linux & freebsd
- firewall: `pf` for freebsd & `firewalld` for linux
- firewall: allow ssh, http, https in; block all other
- firewall freebsd: start pf & pflog services
- fail2ban: Jails for: ssh, nginx-botsearch, nginx-http-auth,
  nginx-limit-req, haproxy-http-auth, recidive
- fail2ban linux: action performed by `firewalld`
- fail2ban freebsd: action performed by `pf`
- chore: Hide command outputs from `if` conditions
- refactor: `if` with `else` checks positive conditions
- refactor: No explicit `return`s on success
- refactor: No `exit`s
- chore: Consistent log formatting with values inside `[]`
- fix: Reverting success isn't operation succes
2025-10-09 22:40:33 +05:30

37 KiB
Executable File