Skip to content
A Python 3 script for updating ipsets for IPv4 and IPv6 from the all.txt list of blocklist.de.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
Readme.md
blocklists-ipset.py
blocklists_ipset.service
blocklists_ipset.timer

Readme.md

blocklist-ipset

A script to update ipsets for IPv4 and IPv6 from the all.txt list of blocklists.de.

Configuration

There's none.

How to use

Create the following ipsets and make sure they exist before you run this script:

create blocklists-de-permanent_v4 hash:ip family inet hashsize 1024 maxelem 65535 comment

create blocklists-de-permanent_v6 hash:ip family inet6 hashsize 1024 maxelem 65535 comment

The script will create the following two sets and load the IPs from the blocklist into the corresponding IPsec by restoring from two temporary files.

create blocklists-de-temporary_v4 hash:ip family inet hashsize 1024 maxelem 65535 comment

create blocklists-de-temporary_v4 hash:ip family inet6 hashsize 1024 maxelem 65535 comment

Afterwards, the temporary sets and the permanent sets are swapped. Then the temporary sets are destroyed and the temporary files deleted.

Errors are written to stderr.

You can’t perform that action at this time.