Skip to content

device: load only required modules

Honor firewall-backend for modules loading and ip forwarding enabling as well:

  • iptables: do not load nftables modules
  • nftables: do not load iptables modules
  • none: do not load any modules and do not enable ip forwarding

The behavior of firewall-backend=none is probably better if it does not touch network settings such as ip_forward. Alternatively a new parameter for ip_forward but no firewall rules could be introduced.

This also removes some pointless error messages from the log in case of a kernel without modules which are not really used:

Aug 30 17:03:26 pxc7 NetworkManager[2463]: <error> [1661879006.5237] modprobe: '/sbin/modprobe --use-blacklist nf_nat_h323' exited with error 256 (modprobe: FATAL: Module nf_nat_h323 not found in directory /lib/modules/5.10.35+gitf441c6d)
Edited by Adrian Freihofer

Merge request reports