Skip to content

Commit 342e3d5

Browse files
author
sheynsw
committed
adjust: iptables
1 parent 8fc4637 commit 342e3d5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/src/box.iptables

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ scripts=$(realpath $0)
44
scripts_dir=$(dirname ${scripts})
55
source /data/adb/box/settings.ini
66

7-
table="222"
8-
fwmark="223"
7+
table="223"
8+
fwmark="222"
99
pref="100"
1010

1111
# ipts_version=$(iptables -V | grep -o "v1\.[0-9]")
@@ -146,7 +146,9 @@ start_redirect() {
146146
fi
147147
fi
148148

149-
${iptables} -t nat -I OUTPUT -j BOX_LOCAL
149+
if [ "${iptables}" != "ip6tables -w 100" ] ; then
150+
${iptables} -t nat -I OUTPUT -j BOX_LOCAL
151+
fi
150152

151153
if [ "${iptables}" != "ip6tables -w 100" ] ; then
152154
${iptables} -A OUTPUT -d 127.0.0.1 -p tcp -m owner --uid-owner ${box_user} --gid-owner ${box_group} -m tcp --dport ${redir_port} -j REJECT

0 commit comments

Comments
 (0)