Other people have similar issues but I tried all their approaches with missing iptable entries on boot, no success so far :| (it appears not to be a typo in the iptable files during load)
I've added a simple rule to iptables
sudo iptables -I INPUT -p tcp -m tcp --dport 8140 -j ACCEPT
and executed
sudo service netfilter-persistent save
I've checked that the 8140 rule is in the iptables rules with
sudo cat /etc/iptables/rules.v4
After rebooting however
sudo iptables -L INPUT -v -n
does not show my 8140 INPUT entry.
systemctl status netfilter-persistent
says all ok
samuel@samuel-VirtualBox:~$ systemctl status netfilter-persistent
* netfilter-persistent.service - netfilter persistent configuration
Loaded: loaded (/lib/systemd/system/netfilter-persistent.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/netfilter-persistent.service.d
`-iptables.conf
Active: active (exited) since Sun 2022-02-20 11:21:47 CET; 10min ago
Docs: man:netfilter-persistent(8)
Process: 642 ExecStart=/usr/sbin/netfilter-persistent start (code=exited, status=0/SUCCESS)
Main PID: 642 (code=exited, status=0/SUCCESS)
Feb 20 11:21:47 samuel-VirtualBox systemd[1]: Starting netfilter persistent configuration...
Feb 20 11:21:47 samuel-VirtualBox netfilter-persistent[649]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
Feb 20 11:21:47 samuel-VirtualBox netfilter-persistent[649]: run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
Feb 20 11:21:47 samuel-VirtualBox systemd[1]: Finished netfilter persistent configuration.
So the service is enabled, when I manually run sudo service netfilter-persistent reload
it seems to load the rules properly, because the 8140 INPUT chain is then shown.
Any hints on what to do would be welcome :)