A while ago, IP forwarding was being set through
has been deprecated.
It is possible to play a bit with
net.ipv4.conf.default.forwarding=1 # Or 0...
This sets the default forwarding state of network devices without explicit configuration. It only affects the devices that will be registered in the future.
A similar setting is the following:
net.ipv4.conf.all.forwarding=1 # Or 0...
This applies to all the network devices (even those not in the
UP state), but
doesn't apply to the devices that will be registered in the future.
Another setting is the following, which acts as an alias of the previous one:
Then just run
sysctl -p to take this parameter into account.
These settings can also be specified replacing the dots by slashes, and are