1
1
mirror of https://github.com/eblot/pybootd.git synced 2024-09-11 22:17:44 +03:00

Simpler syntax for Linux forwarding commands

This commit is contained in:
Emmanuel Blot 2011-05-23 15:56:53 +02:00
parent 6268386efc
commit c24a402b86

View File

@ -62,9 +62,8 @@ case "${OSTYPE}" in
fi
if [ ${ENABLE} -eq 1 ]; then
echo "Enabling IP forwarding through interface $WAN_IF"
iptables --table nat --append POSTROUTING \
--out-interface ${WAN_IF} -j MASQUERADE
iptables --append FORWARD --in-interface ${LAN_IF} -j ACCEPT
iptables -t nat -A POSTROUTING -o ${WAN_IF} -j MASQUERADE
iptables -A FORWARD -i ${LAN_IF} -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
else
echo "Disabling IP forwarding"