mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-28 04:10:34 +05:00
keenetic script check disable ipv4
This commit is contained in:
parent
6b85884cdf
commit
09378553b9
@ -10,6 +10,7 @@ zapret_custom_firewall()
|
|||||||
|
|
||||||
local wan wanif rule
|
local wan wanif rule
|
||||||
|
|
||||||
|
[ "$DISABLE_IPV4" = "1" ] || {
|
||||||
# use IFACE_WAN if defined. if not - search for interfaces with default route.
|
# use IFACE_WAN if defined. if not - search for interfaces with default route.
|
||||||
wanif=${IFACE_WAN:-$(sed -nre 's/^([^\t]+)\t00000000\t[0-9A-F]{8}\t[0-9A-F]{4}\t[0-9]+\t[0-9]+\t[0-9]+\t00000000.*$/\1/p' /proc/net/route | sort -u | xargs)}
|
wanif=${IFACE_WAN:-$(sed -nre 's/^([^\t]+)\t00000000\t[0-9A-F]{8}\t[0-9A-F]{4}\t[0-9]+\t[0-9]+\t[0-9]+\t00000000.*$/\1/p' /proc/net/route | sort -u | xargs)}
|
||||||
for wan in $wanif; do
|
for wan in $wanif; do
|
||||||
@ -18,3 +19,4 @@ zapret_custom_firewall()
|
|||||||
ipt_add_del $1 POSTROUTING -t nat $rule -j MASQUERADE
|
ipt_add_del $1 POSTROUTING -t nat $rule -j MASQUERADE
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user