ipfilter icon indicating copy to clipboard operation
ipfilter copied to clipboard

IP Filter Updater & Generator (ipfilter) - Generates PeerGuardian (.p2p) blocklist from I-Blocklist blocklists and GeoLite2 country blocks

IP Filter Updater & Generator

Creates PeerGuardian (.p2p) blocklist from I-Blocklist blocklists and GeoLite2 country blocks.

Requirements

Operating System:
Linux, FreeBSD, macOS or Windows.

Tools & Utilities:
Bash >= 4.0, awk, grep, gunzip, sed, unzip, curl / wget, gzip / bzip2 / xz / zip(1), notify-send / osascript / powershell(2).

(1) optional, required for gzip / bzip2 / xz / zip compression of output file if configured
(2) optional, required for option -n/--notify on Linux/FreeBSD / macOS / Windows

macOS users might want to use Homebrew to install missing dependencies.

Windows users need to setup a runtime environment. Cygwin, MSYS2, Git for Windows and Windows Subsystem for Linux should all work fine. Git for Windows might be a good choice to get started - it is reasonably lightweight, easy to set up, meets all requirements out of the box and is also available as a portable version. See Windows Runtime Environments for additional information.

Download

Refer to the releases section for downloads links.

Installation

There is no installation required. Simply extract the downloaded archive to a folder of your choice.

Configuration

Open ipfilter.conf in your favorite text editor and adjust the settings to your liking. Refer to embedded comments for details. Before changing any settings, you might want to run the script with default settings to make sure it works as expected.

Subscriptions

Subscriptions are not required to use the I-Blocklist functionality, as most of the lists provided by I-Blocklist are free to download. There are some additional lists that are only available to subscribers, though.

Using the GeoLite2 functionality requires a license key which can be obtained free of charge after registering (refer to this blog post for details).

Usage

Open a terminal/console running Bash and run the script using the following commands:

$ cd <path-to-script>
$ ./ipfilter.sh

Note that root privileges should not be required. Just make sure the configured INSTALL_DST points to a location writeable by the user running the script. The same applies to LOG_FILE if logging is enabled.

For running non-interactively (e.g. via cron), you might want to enable logging and/or use option -n/--notify to send desktop notifications informing you about success/failure.

Use option -h/--help to display available command line options.


Last updated: 04/28/21