To enable IP forwarding on boot in Debian, you put the following in /etc/sysctl.conf:
net.ipv4.ip_forward=1
I've done it thousands of times, and it has always worked without issues. But there is this one Debian Buster machine on which forwarding is enabled for all interfaces except the ethernet interface. In /proc/sys/net/ipv4/conf/ I have the following:
dr-xr-xr-x 1 root root 0 Nov 6 08:07 all
dr-xr-xr-x 1 root root 0 Nov 6 08:07 default
dr-xr-xr-x 1 root root 0 Nov 6 07:53 enp0s25
dr-xr-xr-x 1 root root 0 Nov 6 08:07 lo
dr-xr-xr-x 1 root root 0 Nov 6 08:07 tun-mega
The content of all files is 1, except enp0s25, which is 0. So the forwarding does not work until I enable it manually. I've tried to enable it specifically in /etc/sysctl.conf:
net.ipv4.conf.enp0s25.forwarding=1
But it makes no difference. I notice that the file enp0s25 has a different timestamp, so that may be the key to understanding what is going on.