#!/bin/sh # 2024-04-16 02:28:47 AW IPTABLES=/usr/sbin/iptables IPSET=/usr/sbin/ipset $IPSET create BLOCKLIST hash:net $IPSET add BLOCKLIST 138.255.252.0/22 $IPSET add BLOCKLIST 179.61.32.0/19 $IPSET add BLOCKLIST 181.41.0.0/18 $IPSET add BLOCKLIST 186.189.0.0/18 $IPSET add BLOCKLIST 186.189.128.0/18 $IPSET add BLOCKLIST 190.104.96.0/20 $IPSET add BLOCKLIST 201.229.0.0/17 $IPTABLES -A INPUT -m set --match-set BLOCKLIST src -j DROP $IPTABLES -A OUTPUT -m set --match-set BLOCKLIST dst -j DROP