From 73dab08bdcfcb74ff729d5386721bf10d9bbd2e7 Mon Sep 17 00:00:00 2001 From: Wang Sen Di Date: Tue, 9 Dec 2025 16:49:20 +0800 Subject: [PATCH] - --- netflow/iptables.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/netflow/iptables.sh b/netflow/iptables.sh index 5682724..69c117d 100644 --- a/netflow/iptables.sh +++ b/netflow/iptables.sh @@ -11,7 +11,20 @@ __main() { _owner_id=52000 _chain="output_netflow_owner_${_owner_id}" + cat <<'EOF' | iptables-legacy-restore -v +*mangle +:$_chain - [0:0] +COMMIT +EOF + + cat <<'EOF' | ip6tables-legacy-restore -v +*mangle +:$_chain - [0:0] +COMMIT +EOF + for cmd in iptables ip6tables; do + $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