#!/bin/bash # # GitHub IP Ranges - iptables/ipset rules # ASN: AS36459 # Generated: 2025-12-15 # Source: ScaniteX (https://scanitex.com) # # Usage: chmod +x this_script.sh && sudo ./this_script.sh # # Create IPv4 ipset ipset create github_v4 hash:net -exist ipset flush github_v4 # Add IPv4 ranges ipset add github_v4 140.82.114.0/24 ipset add github_v4 140.82.121.0/24 ipset add github_v4 192.30.254.0/24 ipset add github_v4 140.82.112.0/20 ipset add github_v4 192.30.253.0/24 ipset add github_v4 143.55.64.0/20 ipset add github_v4 140.82.126.0/24 ipset add github_v4 140.82.120.0/24 ipset add github_v4 140.82.116.0/24 ipset add github_v4 192.30.255.0/24 ipset add github_v4 140.82.112.0/24 ipset add github_v4 140.82.124.0/24 ipset add github_v4 140.82.120.0/23 ipset add github_v4 192.30.254.0/23 ipset add github_v4 192.30.252.0/23 ipset add github_v4 140.82.115.0/24 ipset add github_v4 143.55.64.0/24 ipset add github_v4 140.82.123.0/24 ipset add github_v4 192.30.252.0/22 ipset add github_v4 140.82.125.0/24 ipset add github_v4 140.82.122.0/24 ipset add github_v4 192.30.252.0/24 ipset add github_v4 140.82.113.0/24 ipset add github_v4 140.82.117.0/24 # Create IPv6 ipset ipset create github_v6 hash:net family inet6 -exist ipset flush github_v6 # Add IPv6 ranges ipset add github_v6 2620:112:3000::/44 ipset add github_v6 2a0a:a440::/29 # Apply iptables rules (uncomment to use) # iptables -A INPUT -m set --match-set github_v4 src -j ACCEPT # iptables -A INPUT -m set --match-set github_v4 src -j DROP # ip6tables -A INPUT -m set --match-set github_v6 src -j ACCEPT # ip6tables -A INPUT -m set --match-set github_v6 src -j DROP echo "IP ranges for GitHub loaded successfully!" echo "IPv4 ranges: 24" echo "IPv6 ranges: 2"