Re: FirewallD on a Debian router : can't forward any packets
On Wed, 28 Jan 2026 16:36:28 +0100
Nicolas Kovacs <info@microlinux.fr> 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.
--
Joe
Reply to: