From a4cab8f66b5eeaeb52b35a408956f348ef5a4035 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sat, 13 Apr 2024 21:32:04 +0800 Subject: [PATCH] =?UTF-8?q?~=E4=BF=AE=E5=A4=8Dmac=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/start.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 600238e20..3dd830b77 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -900,7 +900,7 @@ start_ipt_route() { #iptables-route通用工具 #局域网mac地址黑名单过滤 [ "$3" = 'PREROUTING' ] && [ -n "$(cat "$CRASHDIR"/configs/mac)" ] && [ "$macfilter_type" != "白名单" ] && { for mac in $(cat "$CRASHDIR"/configs/mac); do - $1 -t $2 -A $4 -m mac --mac-. $mac -j RETURN + $1 -t $2 -A $4 -m mac --mac-source $mac -j RETURN done } #tcp&udp分别进代理链 @@ -909,7 +909,7 @@ start_ipt_route() { #iptables-route通用工具 for mac in $( #mac白名单 cat "$CRASHDIR"/configs/mac ); do - $1 -t $2 -A $4 -p $5 -m mac --mac-. $mac -j $JUMP + $1 -t $2 -A $4 -p $5 -m mac --mac-source $mac -j $JUMP done else for ip in $HOST_IP; do #仅限指定网段流量 @@ -944,13 +944,13 @@ start_ipt_dns() { #iptables-dns通用工具 #局域网mac地址黑名单过滤 [ "$2" = 'PREROUTING' ] && [ -s "$CRASHDIR"/configs/mac ] && [ "$macfilter_type" != "白名单" ] && { for mac in $(cat "$CRASHDIR"/configs/mac); do - $1 -t nat -A $3 -m mac --mac-. $mac -j RETURN + $1 -t nat -A $3 -m mac --mac-source $mac -j RETURN done } if [ "$2" = 'PREROUTING' ] && [ -s "$CRASHDIR"/configs/mac ] && [ "$macfilter_type" = "白名单" ]; then for mac in $(cat "$CRASHDIR"/configs/mac); do - $1 -t nat -A $3 -p tcp -m mac --mac-. $mac -j REDIRECT --to-ports $dns_port - $1 -t nat -A $3 -p udp -m mac --mac-. $mac -j REDIRECT --to-ports $dns_port + $1 -t nat -A $3 -p tcp -m mac --mac-source $mac -j REDIRECT --to-ports $dns_port + $1 -t nat -A $3 -p udp -m mac --mac-source $mac -j REDIRECT --to-ports $dns_port done else for ip in $HOST_IP; do #仅限指定网段流量