Please what is the purpose of the "net.ipv4.ip_forward" option in /etc/sysctl.conf

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

What it means when enabled and how can be used?


It seems to enable or disable port forwarding and other forwarding of the traffic possibly.

This is what worked to enable forwarding:
sed -i "s|#net.ipv4.ip_forward=1|net.ipv4.ip_forward= 1|g" /etc/sysctl.conf && sed -i "s|#net.ipv6.conf.all.forwarding=1|net.ipv6.conf.a ll.forwarding=1|g" /etc/sysctl.conf && sysctl -p

To disable, one would add # before the appropriate lines in /etc/sysctl.conf and then do "sysctl -p"