From 1ce560903898ec0f791ece4548423c5c43cb41c1 Mon Sep 17 00:00:00 2001 From: bolvan Date: Fri, 17 May 2019 18:24:51 +0300 Subject: [PATCH] docs : find_wan => find_wan_all --- docs/https.txt | 9 ++++----- docs/wireguard/wireguard_iproute_openwrt.txt | 20 ++++++++------------ 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/https.txt b/docs/https.txt index 6ddd47f..17b148e 100644 --- a/docs/https.txt +++ b/docs/https.txt @@ -97,12 +97,11 @@ redsocks { --- /etc/firewall.user ----- SOXIFIER_PORT=1099 -. /opt/zapret/init.d/openwrt/functions - -create_ipset no-update - -network_find_wan wan_iface +. /opt/zapret/init.d/openwrt/functions +create_ipset no-update + +network_find_wan_all wan_iface for ext_iface in $wan_iface; do network_get_device ext_device $ext_iface ipt OUTPUT -t nat -o $ext_device -p tcp --dport 443 -m set --match-set zapret dst -j REDIRECT --to-port $SOXIFIER_PORT diff --git a/docs/wireguard/wireguard_iproute_openwrt.txt b/docs/wireguard/wireguard_iproute_openwrt.txt index af5bffb..5d4c154 100644 --- a/docs/wireguard/wireguard_iproute_openwrt.txt +++ b/docs/wireguard/wireguard_iproute_openwrt.txt @@ -233,15 +233,13 @@ OUTPUT относится к исходящим с роутера пакетам Если с самого роутера ничего заруливать не надо, можно опустить все до команд с PREROUTING. --/etc/firewall.user---------------------------- -. /opt/zapret/init.d/openwrt/functions - -create_ipset no-update - -network_find_wan wan_iface +. /opt/zapret/init.d/openwrt/functions +create_ipset no-update + +network_find_wan_all wan_iface for ext_iface in $wan_iface; do network_get_device DEVICE $ext_iface - ipt OUTPUT -t mangle -o $DEVICE -p tcp --dport 443 -m set --match-set zapret dst -j MARK --set-mark 0x800/0x800 ipt OUTPUT -t mangle -o $DEVICE -m set --match-set ipban dst -j MARK --set-mark 0x800/0x800 done @@ -302,15 +300,13 @@ config rule Если вам не актуальны исходящие с самого роутера, то можно ничего не менять. --/etc/firewall.user---------------------------- -. /opt/zapret/init.d/openwrt/functions - -create_ipset no-update - -network_find_wan wan_iface +. /opt/zapret/init.d/openwrt/functions +create_ipset no-update + +network_find_wan_all wan_iface for ext_iface in $wan_iface; do network_get_device DEVICE $ext_iface - ipt OUTPUT -t mangle -o $DEVICE -p tcp --dport 443 -m set --match-set zapret dst -j MARK --set-mark 0x800/0x800 ipt OUTPUT -t mangle -o $DEVICE -m set --match-set ipban dst -j MARK --set-mark 0x800/0x800 ipt OUTPUT -t mangle -o $DEVICE -j MARK --set-mark 0x1000/0x1000