#!/bin/bash # # UCLA IP Ranges - iptables/ipset rules # ASN: AS52 # Generated: 2025-12-16 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create ucla_v4 hash:net -exist ipset flush ucla_v4 # Add IPv4 ranges ipset add ucla_v4 164.67.0.0/16 ipset add ucla_v4 192.35.221.0/24 ipset add ucla_v4 192.35.225.0/24 ipset add ucla_v4 128.97.0.0/16 ipset add ucla_v4 131.179.0.0/16 ipset add ucla_v4 149.142.0.0/16 ipset add ucla_v4 216.41.228.0/24 ipset add ucla_v4 192.154.2.0/24 ipset add ucla_v4 169.232.0.0/16 ipset add ucla_v4 192.35.226.0/24 ipset add ucla_v4 192.35.210.0/24 # Create IPv6 ipset ipset create ucla_v6 hash:net family inet6 -exist ipset flush ucla_v6 # Add IPv6 ranges ipset add ucla_v6 2607:f010::/32 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set ucla_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set ucla_v4 src -j DROP # ip6tables -A INPUT -m set --match-set ucla_v6 src -j ACCEPT # ip6tables -A INPUT -m set --match-set ucla_v6 src -j DROP echo "IP ranges for UCLA loaded successfully!" echo "IPv4 ranges: 11" echo "IPv6 ranges: 1"