diff --git a/modules/module-trust.sh b/modules/module-trust.sh new file mode 100644 index 0000000..2a21076 --- /dev/null +++ b/modules/module-trust.sh @@ -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