Skip to content

Commit

Permalink
adjust: iptables
Browse files Browse the repository at this point in the history
  • Loading branch information
twnesss committed Feb 17, 2023
1 parent 8fc4637 commit 342e3d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/src/box.iptables
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ scripts=$(realpath $0)
scripts_dir=$(dirname ${scripts})
source /data/adb/box/settings.ini

table="222"
fwmark="223"
table="223"
fwmark="222"
pref="100"

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

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

if [ "${iptables}" != "ip6tables -w 100" ] ; then
${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
Expand Down

0 comments on commit 342e3d5

Please sign in to comment.