From 35774c04c6dc465cb0e3a3b4a94cb497796f16b6 Mon Sep 17 00:00:00 2001 From: bolvan Date: Fri, 3 May 2019 15:20:46 +0300 Subject: [PATCH] debian : use SLAVE_ETH only on router --- init.d/debian/zapret | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.d/debian/zapret b/init.d/debian/zapret index 3fecf28..2a9491f 100755 --- a/init.d/debian/zapret +++ b/init.d/debian/zapret @@ -86,7 +86,7 @@ fw_tpws_add() [ -n "$SLAVE_ETH" ] && { iptables -t nat -C PREROUTING -i $SLAVE_ETH -p tcp $1 -j DNAT --to 127.0.0.1:$TPPORT 2>/dev/null || iptables -t nat -I PREROUTING -i $SLAVE_ETH -p tcp $1 -j DNAT --to 127.0.0.1:$TPPORT - } + } iptables -t nat -C OUTPUT -m owner ! --uid-owner $TPWS_USER -p tcp $1 -j DNAT --to 127.0.0.1:$TPPORT 2>/dev/null || iptables -t nat -I OUTPUT -m owner ! --uid-owner $TPWS_USER -p tcp $1 -j DNAT --to 127.0.0.1:$TPPORT