Note: The automated installer handles all these steps, including interactive prompts for database credentials and network configuration.
🗑️ Uninstalling Bad IPs
To completely remove Bad IPs and clean up all configuration:
sudo apt remove --purge bad-ips
This will:
Stop and disable the bad_ips service
Remove the Bad IPs package
Delete the local database (/var/lib/bad_ips/)
Clean up all nftables rules and sets
Expected Warnings
You may see these warnings during removal - they are normal and expected:
dpkg: warning: while removing bad-ips, directory '/usr/local/share' not empty so not removed
dpkg: warning: while removing bad-ips, directory '/usr/local/lib' not empty so not removed
dpkg: warning: while removing bad-ips, directory '/usr/local/etc/badips.d' not empty so not removed
These warnings appear because:
/usr/local/share and /usr/local/lib are system directories that may contain files from other packages
/usr/local/etc/badips.d may contain custom detector configurations you created
dpkg will not remove non-empty directories to avoid deleting files from other packages or your custom configurations
Complete Cleanup: If you want to remove everything including custom configs:
Monitors systemd journal and log files for attack patterns
🚫 Automatic Blocking
Blocks IPs using nftables with configurable timeouts
🗄️ Centralized Database
PostgreSQL for threat sharing across all servers
⚡ Multi-threaded
Async architecture with queue-based pipeline
🎯 Configurable Detectors
SSH, mail, web, DNS - add your own patterns
🛡️ Trusted Networks
Never-block CIDR filtering for management networks
The NATO Effect
"An attack on one is an attack on all."
When any server blocks an IP, it's shared via database with all servers. An attacker brute-forcing SSH on your mail server gets instantly blocked everywhere.