#!/bin/sh # 2024-03-26 02:31:39 ET IPTABLES=/usr/sbin/iptables IPSET=/usr/sbin/ipset $IPSET create BLOCKLIST hash:net $IPSET add BLOCKLIST 164.160.184.0/22 $IPSET add BLOCKLIST 196.188.0.0/14 $IPSET add BLOCKLIST 197.154.0.0/16 $IPSET add BLOCKLIST 197.156.64.0/18 $IPSET add BLOCKLIST 213.55.64.0/18 $IPTABLES -A INPUT -m set --match-set BLOCKLIST src -j DROP $IPTABLES -A OUTPUT -m set --match-set BLOCKLIST dst -j DROP