Skip to content

simonquasar/vipb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge GitHub top language GitHub commit activity

Important

Mar '25: Currently developing 0.9beta4 to a "stable" 0.9 release.

2do:

  • final check on firewall rules/setup (Menu 6.)

VIPB - Versatile IP Blacklister

VIPB (Versatile IP Blacklister) is a little tool written in Bash automates for downloading, processing, and maintaining IPsum blacklists, and provides functionalities for firewall, ban, and log management. It uses ipset with iptables or firewalld (ufw coming soon..). It includes automation via cron jobs, integration with fail2ban, and a user-friendly interface for manual operations.

Features

Automated & Manual IP Ban

  • Ban IP Lists and/or Subnets: Ban individual IPs, /16, and /24 subnets from a file.
  • Dynamic Updates: Automatically download and process IP blacklists from IPsum.
  • Dual Blacklists: Maintains separate lists and ipsets for automated and manual IP bans.

Suspicious IPs to Subnets Aggregator

This function analyzes a list of potentially suspicious IP addresses, identifies patterns of repeated activity within subnets, and aggregates them into entire subnets (/24 or /16) based on user-defined tolerance thresholds.

Daily Ban Automation (via Cron Jobs)

  • Daily Download & Ban: Automated daily IPsum list download and ban via cron jobs.

Firewall Integration

  • Manage ipset: Creates and manages ipset rules for swift IP blocking.
  • Firewalls & Rules: Integrates with both firewalld and iptables (ufw coming soon).
  • Fail2Ban: Works in harmony with Fail2Ban.

CLI

Run via CLI ./vipb.sh args

► VIPB.sh (v0.9beta4) CLI ARGUMENTS

  ban #.#.#.#               ban single IP in manual/user list
  unban #.#.#.#             unban single IP in manual/user list
  download #                download lv #
  compress [listfile.ipb]   compress IPs list [optional: file.ipb]
  banlist [listfile.ipb]    ban IPs/subnets list [optional: file.ipb]
  stats                     view banned VIPB IPs/subnets counts
  true                      simulate cron/CLI (or autoban)
  debug                     debug mode (echoes logs)

                            (*.ipb = list of IPs, one per line)                        

Installation

Ensure required dependencies are installed and active:

  • ipset
  • firewalld or iptables
  • cron
  • curl
  • bash 4.0+
  • optional fail2ban
  • optional figlet

Clone the repository:

git clone https://github.com/simonquasar/vipb
cd vipb

Make the scripts executable:

chmod +x vipb.sh vipb-core.sh

Logs

Operation logs are stored in the script directory.

Contributing

Feel free to submit issues, fork the repository, and create pull requests for any improvements.

License

This project is licensed under the GPL-2.0 License. See the LICENSE file for details.

Credits

Note

This tool is designed for "domestic" server protection. Please use responsibly and ensure you know the implications of firewalling / IP blocking in your environment.