This commit is contained in:
parent
04e36eb9b5
commit
0221028ca9
8
start.sh
8
start.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
#casysctl net.ipv4.ip_forward
|
||||
|
||||
echo -e "
|
||||
░█████╗░███╗░░██╗██████╗░██████╗░░█████╗░░██████╗
|
||||
@ -71,9 +73,7 @@ for country in $COUNTRIES; do
|
||||
continue
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
for country in $COUNTRIES; do
|
||||
|
||||
if ipset list "$country" &>/dev/null; then
|
||||
echo "[$country] Limpando ipset antigo..."
|
||||
@ -83,16 +83,12 @@ for country in $COUNTRIES; do
|
||||
echo "[$country] Criando novo ipset..."
|
||||
ipset create "$country" hash:net maxelem 262144
|
||||
fi
|
||||
done
|
||||
|
||||
for country in $COUNTRIES; do
|
||||
while read -r subnet; do
|
||||
ipset add "$country" "$subnet" -exist || echo "Falha ao adicionar: $subnet"
|
||||
echo "[$country | $subnet] Criando novo ipset..."
|
||||
done < "$target_file"
|
||||
done
|
||||
|
||||
for country in $COUNTRIES; do
|
||||
add_iptables_rule PREROUTING "$country"
|
||||
echo "[$country] Proteção configurada."
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user