/etc/sysctl.conf is not used anymore.
Use /etc/sysctl.d directory.

It was discussed here a few days ago, see
man sysctl.conf(5)

Am 28.01.26 um 19:52 schrieb Joe:
On Wed, 28 Jan 2026 16:36:28 +0100
Nicolas Kovacs <[email protected]> wrote:

First check what systemd knows about IP forwarding. Either

# sysctl net.ipv4.ip_forward

# cat /proc/sys/net/ipv4/ip_forward

will return 0 for disabled, 1 for enabled.

If you get a 0 return, try

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

and see if forwarding is now working. If so there is a line in
/etc/sysctl.conf: net.ipv4.ip_forward = n which may be either zero or
commented out, set it to 1.

There is also a .d directory alternative (better) where you may create
this line in a numbered file, and maybe need to create the directory
first. It's easiest to check that it works first as a line in
sysctl.conf.

Debian and I think other distributions disable forwarding by default
i.e. it must be user-enabled. I don't believe any firewall enables it
automatically. There are many places where it may be set during boot, in
a script, so best check first whether it is already enabled and the
problem is somewhere else.


Reply via email to