Skip to content

Commit

Permalink
handle Debian's default switch to NFT
Browse files Browse the repository at this point in the history
  • Loading branch information
toralf committed Jul 31, 2024
1 parent ab78667 commit 0f68f6e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion ipv4-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion ipv6-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f68f6e

Please sign in to comment.