This commit is contained in:
Your Name 2024-09-30 13:31:30 -06:00
parent dcad7ebb4b
commit 422a43466b

8
modules/module-trust.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
NFT='/usr/bin/nft'
TRUST=($(redis-cli --raw SMEMBERS trust))
for i in "${IP[@]}"; do
HANDLE=$(nft -n -a list ruleset | grep $i | grep handle | cut -d '#' -f2 | cut -d ' ' -f3)
echo "Trusting $i "
$NFT insert rule ip filter input position 0 ip saddr $i accept
done