mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
addfix
This commit is contained in:
parent
2bb0dca0e2
commit
8e11c19dc0
43 changed files with 2004 additions and 0 deletions
15
luci-app-zerotier/root/etc/zerotier.stop
Normal file
15
luci-app-zerotier/root/etc/zerotier.stop
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
zt0="$(ifconfig | grep 'zt' | awk '{print $1}')"
|
||||
[ -z "${zt0}" ] && zt0="$(cat "/tmp/zt.nif")"
|
||||
|
||||
for i in ${zt0}
|
||||
do
|
||||
ip_segment=""
|
||||
iptables -D FORWARD -i "$i" -j ACCEPT 2>/dev/null
|
||||
iptables -D FORWARD -o "$i" -j ACCEPT 2>/dev/null
|
||||
iptables -t nat -D POSTROUTING -o "$i" -j MASQUERADE 2>/dev/null
|
||||
ip_segment="$(ip route | grep "dev $i proto" | awk '{print $1}')"
|
||||
iptables -t nat -D POSTROUTING -s "${ip_segment}" -j MASQUERADE 2>/dev/null
|
||||
echo "zt interface $i is stopped!"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue