df570cb34609c43f5b6fe8865fefaa9e2491bfa1
Mailcow-Ban-Check
This Bash script monitors a remote IP ban list, compares it with previously tracked IPs in SQLite, records changes, and sends notifications to a Discord-compatible webhook
Still in development
Not for Production
!!! Important: the URLs placed into this script will contain credentials/access tokens or API Keys. Treat this script as sensitive. These credentials will be stored in a more secure way in a future update !!!
A Bash-based monitoring tool that tracks changes to a remote IP ban list.
The script downloads a ban list, compares it with previously tracked addresses in a local SQLite database, records new bans and removals, and sends notifications to a Discord-compatible webhook.
Features
- Downloads a remote ban list over HTTPS
- Supports IPv4, IPv6, and CIDR notation
- Removes duplicates and surrounding whitespace
- Tracks active and inactive IP addresses
- Maintains a ban history
- Sends notifications for:
- Newly banned IPs
- IPs removed from the ban list
- Prevents overlapping executions with
flock - Supports cron and systemd timer execution
- Provides commands for viewing history, statistics, and active bans
Requirements
The following commands must be installed:
- Bash
curlsqlite3jqflockawksortcommdatewc
!!! Important: the URLs placed into this script will contain credentials/access tokens or API Keys. Treat this script as sensitive. These credentials will be stored in a more secure way in a future update !!!
Languages
Shell
100%