#!/bin/bash # # STANFORD IP Ranges - iptables/ipset rules # ASN: AS32 # Generated: 2025-12-16 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create stanford_v4 hash:net -exist ipset flush stanford_v4 # Add IPv4 ranges ipset add stanford_v4 171.64.0.0/14 ipset add stanford_v4 204.63.224.0/21 ipset add stanford_v4 128.12.0.0/16 # Create IPv6 ipset ipset create stanford_v6 hash:net family inet6 -exist ipset flush stanford_v6 # Add IPv6 ranges ipset add stanford_v6 2607:f6d0::/32 ipset add stanford_v6 2620:6c:40c0::/48 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set stanford_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set stanford_v4 src -j DROP # ip6tables -A INPUT -m set --match-set stanford_v6 src -j ACCEPT # ip6tables -A INPUT -m set --match-set stanford_v6 src -j DROP echo "IP ranges for STANFORD loaded successfully!" echo "IPv4 ranges: 3" echo "IPv6 ranges: 2"