How to set /proc/sys/net/ipv6/conf/all/forwarding to 1 by default in network namespaces?

By default, when I create a network namespace, I get:

/proc/sys/net/ipv6/conf/all/forwarding=0

Even if it is 1 in my root network namespace or in /etc/sysctl.conf. I was wondering where network namespaces get the default config and how to change that. I'd like to have that set to 1 so that new network namespaces get that config by default.


I thikn I found the answer. In general, network namespaces inherit the parameters of the root namespace. This is controlled by devconf-inherit-init-net settings as explained here: https://www.kernel.org/doc/html/latest/admin-guide/sysctl/net.html#devconf-inherit-init-net

By default all ipv4 parameters are inherited but not ipv6