From 422a43466b2aedaace7c306cf07ed9adc94102a0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 30 Sep 2024 13:31:30 -0600 Subject: [PATCH] fix --- modules/module-trust.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 modules/module-trust.sh 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