Browse Source

init sysv: enable route_localnet only for IFACE_LAN

pull/33/head
bolvan 6 years ago
parent
commit
b4505d7239
  1. 2
      init.d/sysv/zapret

2
init.d/sysv/zapret

@ -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
# 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
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()

Loading…
Cancel
Save