dispherical.com

Redblock

A list of IP ranges (in CIDR format, newline-delimited) registered to regions that have enacted laws requiring age verification for online content deemed "harmful to minors."

faviconThis project was released into the public domain on GitHub.

These laws are often written in vague or overly broad terms, and in practice, they have been used or proposed to restrict access to LGBTQ+ content, sexual health information, and other constitutionally protected material.

Note: This list excludes regions where the relevant laws have been blocked by a court (i.e., under injunction) or have not yet gone into effect. It is actively maintained and updated as new legal developments occur.

API

There is now an API. It is written in Rust and (as of testing) can handle 220,274 requests per second. You can make calls to https://redblock.dispherical.com/test?ip=[ipv4/ipv6]

Privacy Policy: I don't log your IP address and I have no need to. They're checked against ipset and then deleted from memory. faviconYou can view the code for yourself here.

{ "blocked": true } // if the user is in a restricted region
{ "blocked": false } // if the user is NOT in a restricted region

Below are some usage stats from the API:



Usage Instructions (ipset)

wget https://cdn.dispherical.com/redblock/list.txt
grep -v '^#' list.txt | grep -v '^[[:space:]]*$' > clean-list.txt

{
  echo "create blocked4 hash:net family inet hashsize 4096 maxelem 8000000"
  awk '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\/[0-9]+$/ {print "add -exist blocked4", $0}' clean-list.txt
} > ipset-restore.txt

{
  echo "create blocked6 hash:net family inet6 hashsize 4096 maxelem 8000000"
  awk -F: '{if ($0 ~ /^([0-9a-fA-F]{1,4}:){1,7}[0-9a-fA-F]{0,4}(\/[0-9]{1,3})?$/) print "add -exist blocked6", $0}' clean-list.txt
} >> ipset-restore.txt

sudo ipset restore < ipset-restore.txt

sudo ipset test blocked[4/6] [ip]
# e.g. sudo ipset test blocked4 1.1.1.1

Download

You may download the list from https://cdn.dispherical.com/redblock/list.txt.

Below is the header from the list: