diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7996365 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +merged/ +*.bak \ No newline at end of file diff --git a/README.md b/README.md index 995ad9a..6fd4769 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ -# shared-bans - -Shared IP ban list synced to all sami servers \ No newline at end of file +# Shared IP ban list — synced to all sami servers +# +# Two files hold the bans: +# - static/bans.txt — auto-generated from sources.json URLs (regenerated nightly) +# - dynamic/bans.txt — manually-maintained, for IPs you've banned on purpose +# +# To ban an IP or CIDR across all servers, add it to dynamic/bans.txt, commit, push. +# The systemd timer on each server pulls every 5 minutes and applies the union. +# +# Format: one CIDR or IP per line. Lines starting with # are ignored. +# Example: +# # 2026-06-30 — brute-forcing SSH +# 185.220.101.45 +# +# To ban a /24 range: 185.220.101.0/24 \ No newline at end of file diff --git a/dynamic/bans.txt b/dynamic/bans.txt new file mode 100644 index 0000000..622300f --- /dev/null +++ b/dynamic/bans.txt @@ -0,0 +1,8 @@ +# Dynamic ban list — IPs you've banned on purpose. +# One CIDR or IP per line. Lines starting with # are ignored. +# Format example: 185.220.101.45 (or 185.220.101.0/24 for a /24 range) +# +# Add an entry, commit, push. Every server picks it up within 5 minutes. + +# 2026-06-30 — example placeholder +# 192.0.2.1 \ No newline at end of file diff --git a/sources.json b/sources.json new file mode 100644 index 0000000..947267b --- /dev/null +++ b/sources.json @@ -0,0 +1,29 @@ +{ + "_comment": "URLs that return one CIDR or IP per line. Lines starting with # are ignored. Each is fetched nightly into static/bans.txt.", + "sources": [ + { + "name": "israel-ipdeny", + "url": "https://www.ipdeny.com/ipblocks/data/aggregated/il-aggregated.zone", + "format": "cidr-only", + "comment": "Israeli IP ranges via ipdeny.com — primary block for political/regional threats" + }, + { + "name": "russia-ipdeny", + "url": "https://www.ipdeny.com/ipblocks/data/aggregated/ru-aggregated.zone", + "format": "cidr-only", + "comment": "Russian IP ranges — add when needed; comment out to disable" + }, + { + "name": "china-ipdeny", + "url": "https://www.ipdeny.com/ipblocks/data/aggregated/cn-aggregated.zone", + "format": "cidr-only", + "comment": "Chinese IP ranges — uncomment to enable" + }, + { + "name": "firehol-level1", + "url": "https://iplists.firehol.org/files/firehol_level1.netset", + "format": "cidr-or-ip", + "comment": "Firehol Level 1 — high-confidence attackers (updated daily)" + } + ] +} \ No newline at end of file diff --git a/static/bans.txt b/static/bans.txt new file mode 100644 index 0000000..d2f73c0 --- /dev/null +++ b/static/bans.txt @@ -0,0 +1,771 @@ +# Auto-generated from sources.json — do not edit by hand. +# To add new block sources, edit sources.json instead. +# Currently includes: israel-ipdeny (767 CIDRs as of 2026-06-30) + +103.13.208.0/22 +103.14.104.0/22 +103.240.144.0/22 +103.241.64.0/22 +103.45.244.0/22 +103.95.116.0/22 +107.150.178.0/23 +109.160.128.0/17 +109.186.0.0/16 +109.207.76.0/22 +109.226.0.0/18 +109.234.16.0/21 +109.237.76.0/23 +109.253.0.0/16 +109.64.0.0/14 +109.95.128.0/21 +128.139.0.0/16 +130.185.96.0/21 +132.64.0.0/13 +132.72.0.0/14 +132.76.0.0/15 +132.78.0.0/16 +138.134.0.0/16 +141.226.0.0/18 +141.226.118.0/23 +141.226.120.0/21 +141.226.128.0/22 +141.226.132.0/23 +141.226.134.0/24 +141.226.139.0/24 +141.226.144.0/20 +141.226.160.0/19 +141.226.192.0/18 +141.226.64.0/20 +141.226.80.0/22 +141.226.87.0/24 +141.226.88.0/21 +141.226.96.0/20 +144.249.128.0/18 +146.185.56.0/21 +146.19.240.0/24 +146.255.191.0/24 +147.161.0.0/23 +147.161.8.0/21 +147.185.172.0/24 +147.185.237.0/24 +147.189.144.0/21 +147.233.0.0/16 +147.234.0.0/17 +147.234.128.0/19 +147.234.161.0/24 +147.234.162.0/23 +147.234.164.0/22 +147.234.168.0/23 +147.234.171.0/24 +147.234.172.0/23 +147.234.174.0/24 +147.234.176.0/21 +147.234.185.0/24 +147.234.186.0/23 +147.234.188.0/22 +147.234.192.0/18 +147.235.0.0/16 +147.236.0.0/15 +147.75.208.0/20 +149.106.128.0/19 +149.106.224.0/19 +149.170.56.0/23 +149.49.0.0/16 +150.251.232.0/21 +150.251.72.0/22 +159.117.224.0/19 +159.253.121.0/24 +164.138.112.0/20 +167.17.128.0/19 +167.254.208.0/21 +167.86.32.0/19 +167.94.110.0/24 +167.94.174.0/24 +176.100.160.0/19 +176.106.224.0/21 +176.113.47.0/24 +176.119.205.0/24 +176.12.128.0/17 +176.13.0.0/16 +176.223.65.0/24 +176.228.0.0/14 +176.241.112.0/21 +176.97.214.0/24 +178.212.93.0/24 +185.10.6.0/24 +185.10.64.0/22 +185.102.0.0/22 +185.105.176.0/22 +185.106.128.0/22 +185.106.32.0/22 +185.107.108.0/22 +185.108.148.0/22 +185.108.80.0/22 +185.109.148.0/22 +185.11.44.0/22 +185.110.108.0/22 +185.111.189.0/24 +185.114.120.0/22 +185.115.108.0/22 +185.115.212.0/22 +185.115.224.0/22 +185.117.96.0/24 +185.118.252.0/22 +185.120.124.0/22 +185.122.205.0/24 +185.122.8.0/22 +185.125.12.0/22 +185.127.16.0/22 +185.127.8.0/22 +185.13.192.0/22 +185.130.84.0/22 +185.131.144.0/22 +185.131.176.0/22 +185.132.156.0/22 +185.136.132.0/24 +185.138.168.0/22 +185.139.228.0/22 +185.139.240.0/22 +185.142.164.0/22 +185.144.156.0/22 +185.144.168.0/22 +185.144.88.0/22 +185.145.212.0/22 +185.145.252.0/22 +185.145.28.0/22 +185.149.252.0/22 +185.151.196.0/22 +185.159.109.0/24 +185.159.232.0/22 +185.159.72.0/22 +185.16.88.0/22 +185.161.108.0/23 +185.162.124.0/22 +185.162.148.0/22 +185.163.148.0/22 +185.164.16.0/22 +185.164.192.0/22 +185.167.108.0/22 +185.167.152.0/22 +185.168.68.0/22 +185.169.148.0/22 +185.169.200.0/22 +185.172.80.0/22 +185.175.108.0/22 +185.175.32.0/22 +185.179.240.0/22 +185.18.204.0/22 +185.18.40.0/22 +185.180.100.0/22 +185.181.8.0/22 +185.182.20.0/22 +185.182.76.0/22 +185.183.132.0/22 +185.183.188.0/22 +185.184.16.0/22 +185.184.244.0/22 +185.185.132.0/22 +185.187.160.0/22 +185.187.32.0/21 +185.191.204.0/22 +185.194.240.0/22 +185.196.126.0/23 +185.197.182.0/24 +185.197.204.0/22 +185.213.252.0/22 +185.217.96.0/22 +185.220.204.0/22 +185.223.0.0/22 +185.225.172.0/22 +185.227.108.0/22 +185.23.172.0/22 +185.230.180.0/22 +185.230.60.0/22 +185.235.246.0/24 +185.237.12.0/22 +185.237.4.0/22 +185.237.96.0/22 +185.238.164.0/24 +185.239.28.0/22 +185.24.204.0/22 +185.24.76.0/22 +185.240.128.0/22 +185.241.24.0/22 +185.241.4.0/22 +185.246.172.0/22 +185.246.252.0/22 +185.247.116.0/22 +185.248.160.0/22 +185.248.226.0/24 +185.253.72.0/23 +185.253.75.0/24 +185.254.104.0/22 +185.255.164.0/22 +185.27.104.0/22 +185.28.152.0/22 +185.3.144.0/22 +185.32.176.0/22 +185.36.22.0/24 +185.37.148.0/22 +185.38.200.0/22 +185.4.226.0/24 +185.46.76.0/22 +185.47.172.0/22 +185.49.100.0/22 +185.51.23.0/24 +185.53.208.0/22 +185.56.72.0/22 +185.6.64.0/22 +185.60.168.0/22 +185.60.58.0/24 +185.62.120.0/22 +185.63.134.0/24 +185.64.8.0/22 +185.65.144.0/23 +185.66.202.0/23 +185.68.120.0/22 +185.70.248.0/22 +185.80.108.0/22 +185.82.52.0/22 +185.82.68.0/22 +185.83.220.0/22 +185.86.204.0/22 +185.87.160.0/22 +185.89.216.0/22 +185.97.124.0/22 +188.120.128.0/19 +188.190.104.0/22 +188.190.120.0/22 +188.191.147.0/24 +188.191.224.0/21 +188.208.132.0/23 +188.210.255.0/24 +188.64.200.0/21 +188.64.208.0/22 +192.114.0.0/15 +192.116.0.0/15 +192.118.0.0/16 +192.12.79.0/24 +192.132.244.0/24 +192.133.36.0/24 +192.160.252.0/24 +192.189.70.0/24 +192.206.222.0/23 +192.206.224.0/23 +192.206.226.0/24 +192.206.86.0/24 +192.207.2.0/24 +192.207.47.0/24 +192.30.140.0/23 +192.54.204.0/24 +192.86.25.0/24 +192.86.89.0/24 +193.104.115.0/24 +193.104.117.0/24 +193.104.119.0/24 +193.104.147.0/24 +193.104.77.0/24 +193.105.199.0/24 +193.105.203.0/24 +193.105.99.0/24 +193.106.204.0/22 +193.106.52.0/22 +193.108.195.0/24 +193.111.201.0/24 +193.138.92.0/24 +193.142.151.0/24 +193.143.68.0/24 +193.150.127.0/24 +193.16.147.0/24 +193.16.238.0/24 +193.163.128.0/24 +193.163.2.0/24 +193.163.75.0/24 +193.163.84.0/24 +193.168.172.0/22 +193.169.246.0/23 +193.169.70.0/23 +193.169.88.0/23 +193.17.74.0/24 +193.176.36.0/24 +193.186.2.0/24 +193.187.92.0/22 +193.192.44.0/23 +193.201.147.0/26 +193.201.155.128/25 +193.202.8.0/21 +193.202.80.0/21 +193.203.8.0/22 +193.218.207.128/25 +193.222.129.0/24 +193.222.98.0/24 +193.238.188.0/23 +193.238.190.0/24 +193.238.208.0/22 +193.239.108.0/22 +193.242.102.0/24 +193.254.206.0/23 +193.27.92.0/23 +193.28.155.0/24 +193.31.56.0/22 +193.32.96.0/22 +193.33.16.0/23 +193.33.234.0/23 +193.34.56.0/22 +193.36.176.0/24 +193.37.128.0/23 +193.37.130.0/24 +193.41.202.0/24 +193.41.208.0/23 +193.42.56.0/22 +193.43.244.0/22 +193.46.64.0/24 +193.47.165.0/24 +193.47.248.0/24 +193.47.56.0/22 +193.84.87.0/24 +193.93.96.0/22 +194.106.204.0/23 +194.110.249.0/24 +194.114.146.0/23 +194.116.168.0/24 +194.116.226.0/24 +194.146.24.0/23 +194.146.38.0/23 +194.150.218.0/23 +194.153.101.0/24 +194.169.183.0/24 +194.177.16.0/22 +194.180.243.0/24 +194.187.36.0/22 +194.187.84.0/22 +194.213.4.0/24 +194.238.72.0/22 +194.242.24.0/23 +194.247.166.0/23 +194.28.46.0/23 +194.29.32.0/20 +194.31.176.0/22 +194.31.58.0/24 +194.36.88.0/22 +194.37.80.0/22 +194.41.120.0/22 +194.50.175.0/24 +194.50.71.0/24 +194.50.89.0/24 +194.54.168.0/22 +194.56.215.0/24 +194.62.46.0/24 +194.8.76.0/23 +194.8.88.0/23 +194.88.108.0/22 +194.88.136.0/23 +194.90.0.0/16 +194.99.60.0/22 +195.10.194.0/24 +195.110.40.0/23 +195.114.28.0/23 +195.128.145.0/24 +195.128.176.0/23 +195.133.152.0/21 +195.160.240.0/22 +195.162.66.0/23 +195.178.12.0/23 +195.184.224.0/22 +195.189.140.0/23 +195.189.192.0/23 +195.190.23.0/24 +195.191.52.0/23 +195.192.224.0/21 +195.200.205.0/24 +195.200.92.0/23 +195.211.24.0/22 +195.216.128.0/22 +195.216.252.0/24 +195.225.46.0/23 +195.225.62.0/23 +195.234.158.0/24 +195.238.120.0/22 +195.244.22.0/23 +195.245.108.0/23 +195.246.196.0/24 +195.250.33.0/24 +195.28.166.0/23 +195.28.180.0/23 +195.3.136.0/22 +195.43.140.0/24 +195.60.232.0/22 +195.62.18.0/23 +195.66.118.0/24 +195.82.108.0/22 +195.82.128.0/23 +195.93.234.0/23 +195.95.149.0/24 +195.95.183.0/24 +198.202.22.0/24 +198.49.162.0/24 +198.99.230.0/24 +199.101.112.0/22 +199.115.175.0/24 +199.203.0.0/16 +2.52.0.0/14 +2.57.228.0/22 +203.33.70.0/24 +204.52.208.0/24 +204.57.218.0/24 +207.232.0.0/18 +209.204.117.0/24 +209.206.0.0/19 +209.35.197.0/24 +209.35.224.0/19 +212.103.56.0/22 +212.104.212.0/23 +212.107.0.0/22 +212.116.160.0/19 +212.117.128.0/19 +212.119.40.0/21 +212.143.0.0/16 +212.150.0.0/16 +212.179.0.0/16 +212.18.252.0/22 +212.199.0.0/16 +212.235.0.0/17 +212.25.64.0/18 +212.29.192.0/18 +212.32.54.0/24 +212.46.40.0/24 +212.47.56.0/24 +212.55.184.0/21 +212.59.64.0/21 +212.68.128.0/19 +212.76.96.0/19 +212.80.204.0/22 +212.86.104.0/23 +212.90.108.0/22 +213.137.64.0/19 +213.151.32.0/19 +213.255.192.0/23 +213.255.194.0/24 +213.255.196.0/23 +213.255.199.0/24 +213.255.204.0/24 +213.255.207.0/24 +213.255.212.0/22 +213.255.220.0/22 +213.255.232.0/21 +213.255.240.0/22 +213.255.248.0/21 +213.57.0.0/16 +213.8.0.0/16 +216.150.30.0/23 +216.203.59.0/24 +216.252.176.0/20 +217.11.162.0/23 +217.132.0.0/16 +217.175.80.0/20 +217.194.128.0/22 +217.194.136.0/23 +217.194.139.0/24 +217.194.144.0/24 +217.194.151.0/24 +217.194.152.0/24 +217.194.157.0/24 +217.194.158.0/23 +217.194.192.0/20 +217.22.112.0/20 +217.65.32.0/20 +31.12.76.0/22 +31.133.100.0/22 +31.154.0.0/16 +31.168.0.0/16 +31.193.185.0/24 +31.210.176.0/20 +31.220.151.0/24 +31.40.220.0/22 +31.40.228.0/22 +31.44.128.0/20 +37.122.152.0/22 +37.122.156.0/23 +37.142.0.0/16 +37.19.112.0/20 +37.25.32.0/21 +37.26.144.0/21 +37.44.200.0/22 +37.46.32.0/20 +37.60.40.0/21 +45.128.248.0/22 +45.133.241.0/24 +45.136.240.0/22 +45.140.204.0/22 +45.143.4.0/22 +45.145.128.0/22 +45.145.172.0/22 +45.148.232.0/22 +45.155.164.0/22 +45.158.24.0/22 +45.159.128.0/22 +45.248.36.0/23 +45.65.100.0/22 +45.67.132.0/22 +45.8.56.0/22 +45.80.104.0/22 +45.80.88.0/22 +45.82.106.0/23 +45.83.40.0/22 +45.86.112.0/22 +45.88.64.0/24 +45.88.72.0/22 +45.9.48.0/22 +45.91.168.0/22 +45.92.116.0/22 +45.93.92.0/22 +45.95.92.0/22 +46.116.0.0/15 +46.120.0.0/15 +46.149.160.0/22 +46.19.80.0/21 +46.210.0.0/16 +46.232.208.0/23 +46.243.144.0/22 +46.255.74.0/23 +46.31.96.0/21 +5.100.248.0/21 +5.102.192.0/18 +5.104.240.0/21 +5.144.48.0/20 +5.180.180.0/22 +5.182.180.0/22 +5.182.56.0/22 +5.22.128.0/21 +5.28.128.0/18 +5.29.0.0/16 +50.21.28.0/22 +62.0.0.0/16 +62.112.0.0/22 +62.128.32.0/19 +62.164.170.0/24 +62.182.192.0/21 +62.219.0.0/16 +62.3.59.0/24 +62.56.128.0/19 +62.56.160.0/20 +62.56.216.0/21 +62.56.224.0/19 +62.90.0.0/16 +63.250.56.0/21 +64.226.196.0/22 +64.239.23.0/24 +64.255.44.0/23 +64.7.88.0/22 +69.7.78.0/24 +72.4.64.0/21 +77.124.0.0/14 +78.138.36.0/22 +78.138.4.0/22 +78.138.41.0/24 +78.138.53.0/24 +78.138.54.0/23 +78.138.56.0/23 +78.138.59.0/24 +78.138.60.0/24 +78.138.63.0/24 +78.138.8.0/24 +79.108.160.0/21 +79.176.0.0/13 +80.178.0.0/15 +80.230.0.0/16 +80.240.116.0/22 +80.240.120.0/22 +80.240.125.0/24 +80.240.98.0/23 +80.244.160.0/20 +80.246.128.0/20 +80.250.144.0/20 +80.70.128.0/20 +80.74.96.0/19 +81.173.8.0/22 +81.199.0.0/20 +81.199.128.0/20 +81.199.146.0/23 +81.199.148.0/22 +81.199.152.0/21 +81.199.16.0/21 +81.199.160.0/19 +81.199.192.0/18 +81.199.32.0/22 +81.199.40.0/21 +81.199.48.0/20 +81.199.80.0/20 +81.199.96.0/19 +81.218.0.0/16 +81.28.4.0/22 +81.5.0.0/18 +82.102.128.0/18 +82.115.214.0/24 +82.163.136.0/21 +82.163.248.0/22 +82.163.48.0/22 +82.166.0.0/16 +82.80.0.0/15 +82.97.204.0/24 +83.130.0.0/16 +83.136.237.0/24 +83.142.52.0/22 +83.151.198.0/23 +83.229.0.0/23 +83.229.100.0/22 +83.229.108.0/24 +83.229.110.0/23 +83.229.114.0/24 +83.229.116.0/22 +83.229.12.0/23 +83.229.18.0/24 +83.229.2.0/24 +83.229.22.0/24 +83.229.24.0/24 +83.229.27.0/24 +83.229.30.0/23 +83.229.36.0/23 +83.229.52.0/22 +83.229.56.0/22 +83.229.60.0/24 +83.229.63.0/24 +83.229.66.0/24 +83.229.68.0/22 +83.229.7.0/24 +83.229.72.0/22 +83.229.80.0/21 +83.229.92.0/24 +83.229.95.0/24 +84.108.0.0/14 +84.228.0.0/15 +84.252.96.0/22 +84.94.0.0/15 +85.130.128.0/17 +85.155.128.0/20 +85.155.152.0/22 +85.155.88.0/21 +85.159.160.0/21 +85.209.244.0/22 +85.250.0.0/16 +85.255.16.0/20 +85.64.0.0/15 +85.8.152.0/24 +86.104.226.0/24 +87.68.0.0/14 +88.202.216.0/21 +88.218.220.0/22 +89.138.0.0/15 +89.208.0.0/21 +89.208.128.0/21 +89.208.56.0/21 +89.33.28.0/23 +89.36.197.0/24 +89.37.236.0/22 +89.38.28.0/22 +89.39.245.0/24 +89.40.170.0/24 +89.40.37.0/24 +89.40.66.0/24 +89.41.188.0/24 +89.42.24.0/24 +89.43.48.0/24 +91.135.96.0/20 +91.143.224.0/20 +91.193.48.0/22 +91.194.114.0/23 +91.195.162.0/23 +91.196.180.0/22 +91.197.100.0/22 +91.197.60.0/22 +91.198.129.0/24 +91.198.188.0/24 +91.198.205.0/24 +91.198.5.0/24 +91.198.70.0/24 +91.199.100.0/24 +91.199.119.0/24 +91.199.202.0/24 +91.199.29.0/24 +91.199.53.0/24 +91.199.69.0/24 +91.199.94.0/24 +91.199.99.0/24 +91.202.168.0/22 +91.203.120.0/22 +91.205.152.0/22 +91.207.240.0/23 +91.207.34.0/23 +91.207.90.0/23 +91.208.118.0/24 +91.208.129.0/24 +91.208.139.0/24 +91.208.140.0/24 +91.208.147.0/24 +91.208.218.0/24 +91.208.86.0/24 +91.209.113.0/24 +91.209.238.0/24 +91.211.145.0/24 +91.212.114.0/24 +91.212.189.0/24 +91.212.76.0/24 +91.213.211.64/26 +91.214.100.0/22 +91.216.222.0/24 +91.216.252.0/24 +91.217.51.0/24 +91.220.22.0/24 +91.223.106.0/24 +91.223.11.0/24 +91.223.169.0/24 +91.223.236.0/24 +91.223.54.0/24 +91.223.60.0/24 +91.226.245.0/24 +91.226.72.0/24 +91.226.76.0/24 +91.227.164.0/23 +91.227.70.0/23 +91.228.126.0/23 +91.228.162.0/23 +91.228.248.0/24 +91.230.236.0/24 +91.230.48.0/24 +91.230.79.0/24 +91.231.192.0/22 +91.235.107.0/24 +91.235.150.0/23 +91.235.34.0/23 +91.239.58.0/24 +91.240.146.0/23 +91.240.234.0/23 +91.246.218.0/24 +91.90.128.0/20 +91.90.163.0/24 +91.90.168.0/23 +91.92.197.0/24 +92.61.224.0/20 +93.113.31.0/24 +93.114.168.0/24 +93.123.20.0/24 +93.157.80.0/21 +93.172.0.0/15 +93.175.32.0/19 +93.93.205.0/24 +94.103.185.0/24 +94.154.123.0/24 +94.154.173.0/24 +94.156.175.0/24 +94.156.253.0/24 +94.156.64.0/23 +94.159.128.0/17 +94.188.128.0/17 +94.230.80.0/20 +95.129.32.0/22 +95.142.16.0/20 +95.175.32.0/19 +95.183.0.0/21 +95.35.0.0/16 +95.86.64.0/18 +96.9.127.0/24 diff --git a/static/bans.txt.raw b/static/bans.txt.raw new file mode 100644 index 0000000..e69de29