#!/bin/bash # # HEANET - HEAnet CLG IP Ranges - iptables/ipset rules # ASN: AS1213 # Generated: 2025-12-15 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create heanetheanetclg_v4 hash:net -exist ipset flush heanetheanetclg_v4 # Add IPv4 ranges ipset add heanetheanetclg_v4 193.1.0.0/16 ipset add heanetheanetclg_v4 87.32.0.0/12 ipset add heanetheanetclg_v4 143.239.0.0/16 ipset add heanetheanetclg_v4 149.157.0.0/16 ipset add heanetheanetclg_v4 91.193.188.0/22 ipset add heanetheanetclg_v4 44.155.0.0/16 ipset add heanetheanetclg_v4 77.87.24.0/21 ipset add heanetheanetclg_v4 157.190.0.0/16 ipset add heanetheanetclg_v4 136.201.0.0/16 ipset add heanetheanetclg_v4 134.226.0.0/16 ipset add heanetheanetclg_v4 160.6.0.0/16 ipset add heanetheanetclg_v4 147.252.0.0/16 ipset add heanetheanetclg_v4 149.153.0.0/16 ipset add heanetheanetclg_v4 140.203.0.0/16 ipset add heanetheanetclg_v4 45.144.8.0/22 ipset add heanetheanetclg_v4 91.123.224.0/20 ipset add heanetheanetclg_v4 136.206.0.0/16 # Create IPv6 ipset ipset create heanetheanetclg_v6 hash:net family inet6 -exist ipset flush heanetheanetclg_v6 # Add IPv6 ranges ipset add heanetheanetclg_v6 2001:770::/32 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set heanetheanetclg_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set heanetheanetclg_v4 src -j DROP # ip6tables -A INPUT -m set --match-set heanetheanetclg_v6 src -j ACCEPT # ip6tables -A INPUT -m set --match-set heanetheanetclg_v6 src -j DROP echo "IP ranges for HEANET - HEAnet CLG loaded successfully!" echo "IPv4 ranges: 17" echo "IPv6 ranges: 1"