How do I turn on IP forwarding on Linux?

Linux IP forwarding.

To turn forwarding on temporarily, use the following command as root:

echo "1" > /proc/sys/net/ipv4/ip_forward

or

FORWARD_IPV4=true in /etc/network ?

#CRITICAL: Enable IP forwarding since it is disabled by default since

#

# Redhat Users: you may try changing the options in

# /etc/sysconfig/network from:

#

# FORWARD_IPV4=false

# to

# FORWARD_IPV4=true

#

You can add this to /etc/rc.local or in later versions it can be enabled in the network configuration (see the documentation for your particular distro).