When installing iptables-persistent and its dependency, netfilter-persistent, the apt job kept failing. While netfilter-persistent still uses an init.d script and the server is on systemd, this error appeared in the log:
Sep 05 20:57:42 server systemd[1]: Unit systemd-modules-load.service entered failed state.
Sep 05 20:57:42 server systemd[1]: Dependency failed for netfilter persistent configuration.
Sep 05 20:57:42 server systemd[1]: Failed to start Load Kernel Modules.
Sep 05 20:57:42 server systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
Sep 05 20:57:42 server systemd-modules-load[21370]: Failed to lookup alias 'loop': Function not implemented
Sep 05 20:57:42 server systemd-modules-load[21370]: could not open moddep file '/lib/modules/4.1.5-x86_64-linode61/modules.dep.bin'
Sep 05 20:57:42 server systemd[1]: Starting Load Kernel Modules...
At first, I assumed that netfliter-persistent was just a bit dated. But I ran depmod and got this output:
depmod: WARNING: could not open /lib/modules/4.1.5-x86_64-linode61/modules.order: No such file or directory
depmod: WARNING: could not open /lib/modules/4.1.5-x86_64-linode61/modules.builtin: No such file or directory
I then ran into this semi-related thread on the forum (
viewtopic.php?f=20&t=10329) where @rsk mentions "ufw assumes a modular kernel and tries to blindly load the netfilter modules - while they're statically built in on a Linode kernel." Is this the case with netfilter-persistent perhaps? If so, what can I do about it?