Advanced IP Management System with Threat Intelligence Integration | byfranke.com
- Real-time IP threat analysis via AbuseIPDB
- Dual firewall management (UFW + Fail2Ban)
- Automatic security updates
- Secure API key storage
- Cross-platform support (APT/DNF/YUM based systems)
- Detailed threat reporting
- One-click mass unban
- New in v2.3: Threat intelligence report before banning IPs
sudo cd /etc
sudo git clone https://github.com/byfranke/IPDefender
sudo cd IPDefender
sudo chmod +x IPDefender.sh
sudo mv IPDefender.sh IPDefendersudo IPDefender --install-deps- Create free account at AbuseIPDB
- Get API key from dashboard
- Configure in IPDefender:
sudo IPDefender --api-abuseipdb YOUR_API_KEY# Ban IP with threat intelligence report
sudo IPDefender --ban 192.0.2.5 "SSH brute force"
# Bulk ban IPs from file (one per line)
sudo IPDefender --ban-list malicious_ips.txt "Botnet activity"
# Analyze IP reputation
sudo IPDefender --check 203.0.113.1
# List active bans
sudo IPDefender --list
# Update to latest version
sudo IPDefender --update| Command | Description |
|---|---|
--install-deps |
Install dependencies (UFW, Fail2Ban, curl, jq, git) |
--ban <IP> [reason] |
Ban IP after showing threat report + optional reason |
--ban-list <file> |
Bulk ban IPs from file (with detailed summary) |
--check <IP> |
Analyze IP reputation with AbuseIPDB |
--unban <IP> |
Remove IP ban |
--unban-all |
Remove all bans (with confirmation) |
--list |
Show active bans across UFW, Fail2Ban and tracked IPs |
--api-abuseipdb <KEY> |
Configure AbuseIPDB API key |
--update |
Update to latest version |
--version |
Show current version |
--help |
Display help menu |
# Install and configure
sudo IPDefender --install-deps
sudo IPDefender --api-abuseipdb YOUR_KEY
# Investigate suspicious IP
sudo IPDefender --check 198.51.100.2
# Ban with threat intelligence (now shows report before banning)
sudo IPDefender --ban 198.51.100.2 "High threat score"
# Bulk ban from file (one IP per line)
sudo IPDefender --ban-list malicious_ips.txt "Botnet activity"
# Weekly maintenance
sudo IPDefender --update
sudo IPDefender --list-
Threat Intelligence Before Banning
- Automatic AbuseIPDB report when using
--ban - Shows confidence score, reports, location and ISP
- Helps make informed blocking decisions
- Automatic AbuseIPDB report when using
-
Robust Bulk Processing
- Improved whitespace handling in IP lists
- Detailed summary with counts of:
- New bans
- Skipped (already banned)
- Invalid IPs
-
Enhanced Update System
- Installs to
/usr/local/bin(standard for custom tools) - Automatic git dependency installation
- Clear post-update instructions
- Installs to
-
Extended OS Support
- Added YUM package manager (RHEL/CentOS)
- Improved distro compatibility checks
- Linux (Debian/RedHat based distributions)
- Root privileges
- curl, jq, git
- UFW & Fail2Ban
Maintained by Frank E | Report Issue
This tool is maintained through community support. Help keep it active: