Setup for running fail2ban on machine with npm in a docker container to ban ips in cloudflare
Go into the nginx folder of the NPM docker volume and add/customize these files.
/nginx/custom/cloudflare
These do not update frequently but you could make a script to query https://www.cloudflare.com/ips-v4/ and v6
# - IPv4
set_real_ip_from 103.21.244.0/22;