firewall/modules/module-trust.sh
Your Name 422a43466b fix
2024-09-30 13:31:30 -06:00

9 lines
279 B
Bash

#!/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