If you want to set up some kind of routing (of IP packets) on Debian 13, you first have to ensure that “Forwarding” is activated. By default it isn’t. Activation of Forwarding means that packets coming in at one interface might be transferred to another interface.
The following two commands will show you if forwarding is activated (“1”) or not (“0”):
sysctl net.ipv4.ip_forward
sysctl net.ipv6.conf.all.forwarding
if forwarding is not activated, the following two lines will activate it temporarily (until reboot of the system):
sysctl -w net.ipv4.ip_forward=1
sysctl -w net.ipv6.conf.all.forwarding=1
To make this persistent (“Survive a boot”), create a file /etc/sysctl.d/99-ip-forward.conf with the following two lines as content:
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
Finally activate this file with
sysctl -p /etc/sysctl.d/99-ip-forward.conf
To verify that it is working check it (after a reboot) with the following two commands:
sysctl net.ipv4.ip_forward
sysctl net.ipv6.conf.all.forwarding
Both commands should deliver “1”.