Skip to content

A Python 3 script for updating ipsets for IPv4 and IPv6 from the all.txt list of blocklist.de.

License

Notifications You must be signed in to change notification settings

Thermi/blocklists-ipset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Python 3 script for updating ipsets for IPv4 and IPv6 from the all.txt list of blocklist.de.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages