#!/bin/bash # # IONSWITCH-NW IP Ranges - iptables/ipset rules # ASN: AS964 # Generated: 2025-12-16 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create ionswitchnw_v4 hash:net -exist ipset flush ionswitchnw_v4 # Add IPv4 ranges ipset add ionswitchnw_v4 23.140.96.0/24 ipset add ionswitchnw_v4 45.61.144.0/23 ipset add ionswitchnw_v4 104.192.102.0/24 ipset add ionswitchnw_v4 23.140.99.0/24 ipset add ionswitchnw_v4 23.138.41.0/24 ipset add ionswitchnw_v4 23.140.97.0/24 ipset add ionswitchnw_v4 23.140.98.0/24 ipset add ionswitchnw_v4 198.73.190.0/24 ipset add ionswitchnw_v4 23.138.40.0/22 # Create IPv6 ipset ipset create ionswitchnw_v6 hash:net family inet6 -exist ipset flush ionswitchnw_v6 # Add IPv6 ranges ipset add ionswitchnw_v6 2602:fe54::/32 ipset add ionswitchnw_v6 2606:ddc0::/32 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set ionswitchnw_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set ionswitchnw_v4 src -j DROP # ip6tables -A INPUT -m set --match-set ionswitchnw_v6 src -j ACCEPT # ip6tables -A INPUT -m set --match-set ionswitchnw_v6 src -j DROP echo "IP ranges for IONSWITCH-NW loaded successfully!" echo "IPv4 ranges: 9" echo "IPv6 ranges: 2"