#!/bin/bash # # FUNETAS - CSC - Tieteen tietotekniikan keskus Oy IP Ranges - iptables/ipset rules # ASN: AS1741 # Generated: 2025-12-15 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create funetascsctieteentietotekniikankeskusoy_v4 hash:net -exist ipset flush funetascsctieteentietotekniikankeskusoy_v4 # Add IPv4 ranges ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.201.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.88.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.89.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.64.0/20 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.200.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.108.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.26.123.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.80.0/21 ipset add funetascsctieteentietotekniikankeskusoy_v4 195.148.0.0/16 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.92.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.110.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 193.166.4.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.109.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.111.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 130.234.0.0/16 ipset add funetascsctieteentietotekniikankeskusoy_v4 185.229.128.0/22 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.6.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.38.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.204.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.90.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.202.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 157.24.0.0/16 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.91.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.95.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.205.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 128.214.0.0/16 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.93.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.192.0/21 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.207.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.105.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 130.232.0.0/16 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.94.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.176.0/20 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.107.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 130.231.0.0/16 ipset add funetascsctieteentietotekniikankeskusoy_v4 193.166.0.0/15 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.104.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.84.206.0/24 ipset add funetascsctieteentietotekniikankeskusoy_v4 86.50.0.0/16 ipset add funetascsctieteentietotekniikankeskusoy_v4 192.98.106.0/24 # Create IPv6 ipset ipset create funetascsctieteentietotekniikankeskusoy_v6 hash:net family inet6 -exist ipset flush funetascsctieteentietotekniikankeskusoy_v6 # Add IPv6 ranges ipset add funetascsctieteentietotekniikankeskusoy_v6 2001:708::/32 ipset add funetascsctieteentietotekniikankeskusoy_v6 2001:708:10::/48 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set funetascsctieteentietotekniikankeskusoy_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set funetascsctieteentietotekniikankeskusoy_v4 src -j DROP # ip6tables -A INPUT -m set --match-set funetascsctieteentietotekniikankeskusoy_v6 src -j ACCEPT # ip6tables -A INPUT -m set --match-set funetascsctieteentietotekniikankeskusoy_v6 src -j DROP echo "IP ranges for FUNETAS - CSC - Tieteen tietotekniikan keskus Oy loaded successfully!" echo "IPv4 ranges: 40" echo "IPv6 ranges: 2"