mirror of
https://github.com/bol-van/zapret.git
synced 2025-04-19 13:32:58 +03:00
init sysv: enable route_localnet only for IFACE_LAN
This commit is contained in:
parent
e782347abe
commit
b4505d7239
@ -242,7 +242,7 @@ prepare_tpws()
|
|||||||
id -u $TPWS_USER >/dev/null 2>/dev/null || useradd --no-create-home --system --shell /bin/false $TPWS_USER
|
id -u $TPWS_USER >/dev/null 2>/dev/null || useradd --no-create-home --system --shell /bin/false $TPWS_USER
|
||||||
# otherwise linux kernel will treat 127.0.0.1 as "martian" ip and refuse routing to it
|
# otherwise linux kernel will treat 127.0.0.1 as "martian" ip and refuse routing to it
|
||||||
# NOTE : kernels <3.6 do not have this feature. consider upgrading or change DNAT to REDIRECT and do not bind to 127.0.0.1
|
# NOTE : kernels <3.6 do not have this feature. consider upgrading or change DNAT to REDIRECT and do not bind to 127.0.0.1
|
||||||
for iface in /proc/sys/net/ipv4/conf/*; do sysctl -qw net.ipv4.conf.$(basename $iface).route_localnet=1; done
|
[ -n "$IFACE_LAN" ] && sysctl -qw net.ipv4.conf.$IFACE_LAN.route_localnet=1
|
||||||
}
|
}
|
||||||
|
|
||||||
run_tpws()
|
run_tpws()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user