
Fail2Ban Daily SSH Report Script

π Fail2Ban Daily Report Script
Security isnβt just about blocking attacks β itβs about knowing they happened. This lightweight Bash script integrates with Fail2Ban to generate daily email reports on SSH intrusion attempts, giving you clear, actionable visibility without logging into the server.π§° What It Does
- Pulls the list of IPs banned by the
sshd
jail - Uses
geoiplookup
to identify attacker locations - Formats a clean daily report:
- β IP Address
- π Country of Origin
- π Timestamp
- Emails the report to a predefined address
βοΈ Requirements
fail2ban
geoip-bin
(forgeoiplookup
)- CLI mail client (e.g.,
mutt
,mailx
, orssmtp
) - Basic cron setup