uname -r: 4.13.0-16-generic (ubuntu 17.10 server)
I have a problem that iptables doesn't work after a reboot:
iptables-apply /etc/network/iptables
[ ok ] Stopping fail2ban (via systemctl): fail2ban.service.
Applying new iptables rules from '/etc/network/iptables'... modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.13.0-16-generic
iptables-restore v1.6.1: iptables-restore: unable to initialize table 'filter'
Error occurred at line: 3
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
failed.
Error: unknown error applying new iptables rules: /etc/network/iptables
Reverting to old iptables rules... done.
I've tried to reinstall kernel and iptables:
apt install --reinstall linux-generic linux-image-4.13.0-16-generic linux-image-extra-4.13.0-16-generic linux-headers-4.13.0-16-generic iptables
when I reinstall it (without reboot) iptables works after a service restart.
when I reboot the machine I get the same error again.
I've notice that with every reboot the following folder is gone:
/lib/modules/4.13.0-16-generic/kernel/net/ipv4/netfilter
only 2 files left in folder ipv4 are: gre.ko udp_tunnel.ko
copying the missing files into this location doesn't work, will be removed with the next reboot.
Any idea how to fix this?
copymodsthing is being mounted and I suspect LVM is the cause of the troubles)