Hardening kernel parameter allowed

Hello,

I would like to harden my ubuntu 20.04 like:

net.ipv4.conf.default.accept_redirects
net.ipv4.conf.default.accept_source_route
net.ipv4.ip_forward
net.ipv4.conf.all.log_martians
net.ipv6.conf.all.accept_ra

Is there a guide which kernel parameter are necessary for lxd ?

BR

Based on the fact, that there is only one kernel the question is more likely what does the container do when kernel parameter in the host is different from the settings in the container.

Lets say the parameter for net.ipv4.ip_forward is set to 1 within the host but set to 0 within the container. Which parameter is valid for the container ?

BR

All of those are tied to the network namespace so the container can have different values from the host and whatever is set in the container is what will apply to it.