From 28a88cddce6a4b22f3634985b7afaf7fea8769ef Mon Sep 17 00:00:00 2001 From: Wang Sen Di Date: Tue, 9 Dec 2025 17:14:37 +0800 Subject: [PATCH] - --- netflow/iptables.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/netflow/iptables.sh b/netflow/iptables.sh index 5b08d0f..5682724 100644 --- a/netflow/iptables.sh +++ b/netflow/iptables.sh @@ -12,20 +12,7 @@ __main() { _chain="output_netflow_owner_${_owner_id}" for cmd in iptables ip6tables; do - - if ! $cmd -t mangle -N "$_chain" 2>/dev/null; then - cat <<'EOF' | iptables-legacy-restore -v -*mangle -:$_chain - [0:0] -COMMIT -EOF - - cat <<'EOF' | ip6tables-legacy-restore -v -*mangle -:$_chain - [0:0] -COMMIT -EOF - fi + $cmd -t mangle -N "$_chain" 2>/dev/null || true if ! $cmd -t mangle -C OUTPUT -m owner --gid-owner "$_owner_id" -j "$_chain" 2>/dev/null; then $cmd -t mangle -A OUTPUT -m owner --gid-owner "$_owner_id" -j "$_chain"