#!/bin/bash # # USGS-AS IP Ranges - iptables/ipset rules # ASN: AS1842 # Generated: 2025-12-13 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create usgsas_v4 hash:net -exist ipset flush usgsas_v4 # Add IPv4 ranges ipset add usgsas_v4 192.55.108.0/24 ipset add usgsas_v4 137.227.230.0/24 ipset add usgsas_v4 152.61.132.0/24 ipset add usgsas_v4 130.118.152.0/24 ipset add usgsas_v4 152.61.229.0/24 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set usgsas_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set usgsas_v4 src -j DROP echo "IP ranges for USGS-AS loaded successfully!" echo "IPv4 ranges: 5" echo "IPv6 ranges: 0"