IP forwarding is the ability for an operating system to accept incoming network packets on one interface, recognize that it is not meant for the system itself, but that it should be passed on to another network, and then forwards it accordingly.
Uncomment or add this line to /etc/sysctl.conf:
net.ipv4.ip_forward=1
To enable the changes made in sysctl.conf, run:
sysctl -p
To enable IP Forwarding, without rebooting the system:
sysctl -w net.ipv4.ip_forward=1
or
echo 1 > /proc/sys/net/ipv4/ip_forward
NOTE: The setting is changed instantly.
cat /proc/sys/net/ipv4/ip_forward
returns:
1
NOTE: