mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-19 03:43:29 +00:00
Fixed zerotier
Fixed Different gateway not accessible problem
This commit is contained in:
parent
16d7e450ad
commit
530d0c1e7f
@ -22,6 +22,8 @@ if [ $nat_enable -eq 1 ]; then
|
||||
iptables -I FORWARD -i $zt0 -j ACCEPT
|
||||
iptables -I FORWARD -o $zt0 -j ACCEPT
|
||||
iptables -t nat -I POSTROUTING -o $zt0 -j MASQUERADE
|
||||
ip_segment=$(ip route | grep "dev $zt0 proto" | awk '{print $1}')
|
||||
iptables -t nat -I POSTROUTING -s $ip_segment -j MASQUERADE
|
||||
fi
|
||||
|
||||
fi
|
||||
|
@ -8,3 +8,5 @@ echo "zt interface $zt0 is stopped!"
|
||||
iptables -D FORWARD -i $zt0 -j ACCEPT 2>/dev/null
|
||||
iptables -D FORWARD -o $zt0 -j ACCEPT 2>/dev/null
|
||||
iptables -t nat -D POSTROUTING -o $zt0 -j MASQUERADE 2>/dev/null
|
||||
ip_segment=$(ip route | grep "dev $zt0 proto" | awk '{print $1}')
|
||||
iptables -t nat -D POSTROUTING -s $ip_segment -j MASQUERADE 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user