#!/bin/bash # # JPNIC Japan Network Information Center IP Ranges - iptables/ipset rules # ASN: AS2515 # Generated: 2025-12-15 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create jpnicjapannetworkinformationcenter_v4 hash:net -exist ipset flush jpnicjapannetworkinformationcenter_v4 # Add IPv4 ranges ipset add jpnicjapannetworkinformationcenter_v4 192.41.192.0/24 ipset add jpnicjapannetworkinformationcenter_v4 202.12.30.0/24 ipset add jpnicjapannetworkinformationcenter_v4 211.120.240.0/21 ipset add jpnicjapannetworkinformationcenter_v4 103.131.194.0/23 # Create IPv6 ipset ipset create jpnicjapannetworkinformationcenter_v6 hash:net family inet6 -exist ipset flush jpnicjapannetworkinformationcenter_v6 # Add IPv6 ranges ipset add jpnicjapannetworkinformationcenter_v6 2001:dc2::/32 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set jpnicjapannetworkinformationcenter_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set jpnicjapannetworkinformationcenter_v4 src -j DROP # ip6tables -A INPUT -m set --match-set jpnicjapannetworkinformationcenter_v6 src -j ACCEPT # ip6tables -A INPUT -m set --match-set jpnicjapannetworkinformationcenter_v6 src -j DROP echo "IP ranges for JPNIC Japan Network Information Center loaded successfully!" echo "IPv4 ranges: 4" echo "IPv6 ranges: 1"