diff --git a/ipv4-rules.sh b/ipv4-rules.sh index 230142f..4edacc8 100755 --- a/ipv4-rules.sh +++ b/ipv4-rules.sh @@ -229,7 +229,13 @@ export PATH=/usr/sbin:/usr/bin:/sbin/:/bin umask 066 -ipt="iptables" +if type iptables-legacy 1>/dev/null; then + ipt="iptables-legacy" +elif type iptables 1>/dev/null; then + ipt="iptables-legacy" +else + echo "can't find iptables executeable" >&1 +fi trustlist="tor-trust" # Tor authorities and snowflake servers jobs=$((1 + $(nproc) / 2)) # parallel jobs of adding ips to an ipset prefix=32 # any ipv4 address of this CIDR block is considered to belong to the same source/owner diff --git a/ipv6-rules.sh b/ipv6-rules.sh index 502f6ff..449cab0 100755 --- a/ipv6-rules.sh +++ b/ipv6-rules.sh @@ -214,7 +214,13 @@ export PATH=/usr/sbin:/usr/bin:/sbin/:/bin umask 066 -ipt="ip6tables" +if type ip6tables-legacy 1>/dev/null; then + ipt="ip6tables-legacy" +elif type ip6tables 1>/dev/null; then + ipt="ip6tables-legacy" +else + echo "can't find ip6tables executeable" >&1 +fi trustlist="tor-trust6" # Tor authorities and snowflake servers jobs=$((1 + $(nproc) / 2)) # parallel jobs of adding ips to an ipset prefix=80 # any ipv6 address of this CIDR block is considered to belong to the same source/owner