Updated iptables
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
# Очистка старой цепочки
|
||||
iptables -t nat -F CLASH_REDIR 2>/dev/null
|
||||
iptables -t nat -X CLASH_REDIR 2>/dev/null
|
||||
iptables -t nat -F OUTPUT 2>/dev/null
|
||||
iptables -t nat -X OUTPUT 2>/dev/null
|
||||
|
||||
# Создание пользовательской цепочки
|
||||
iptables -t nat -N CLASH_REDIR
|
||||
@@ -23,3 +25,6 @@ iptables -t nat -I OUTPUT -m owner --uid-owner clash -j RETURN
|
||||
# Применяем CLASH_REDIR ко всем TCP
|
||||
iptables -t nat -C OUTPUT -p tcp -j CLASH_REDIR 2>/dev/null || \
|
||||
iptables -t nat -A OUTPUT -p tcp -j CLASH_REDIR
|
||||
|
||||
iptables -t nat -C PREROUTING -i wt0 -p tcp -j REDIRECT --to-port 7892 2>/dev/null || \
|
||||
iptables -t nat -A PREROUTING -i wt0 -p tcp -j REDIRECT --to-port 7892
|
||||
Reference in New Issue
Block a user