iptables-persistent and netfilter-persistent problem when apt-get upgrade

dpkg: dependency problems prevent configuration of iptables-persistent: iptables-persistent depends on netfilter-persistent (= 1.0.4+nmu2); however: Package netfilter-persistent is not configured yet.

The apt-get upgrade shows there are issues with iptables-presistent and netfilter-persistent. It’s that only me or there are more users encountering the same problem?
Anyone can advise how to act on that?

Below is some related output from apt-get update…

Reading package lists…
Building dependency tree…
Reading state information…
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up netfilter-persistent (1.0.3+deb8u1) …
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
A dependency job for netfilter-persistent.service failed. See ‘journalctl -xn’ for details.
invoke-rc.d: initscript netfilter-persistent, action “start” failed.
dpkg: error processing package netfilter-persistent ( — configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of iptables-persistent:
iptables-persistent depends on netfilter-persistent (= 1.0.3+deb8u1); however:
Package netfilter-persistent is not configured yet.

dpkg: error processing package iptables-persistent ( — configure):
dependency problems — leaving unconfigured
Errors were encountered while processing:
netfilter-persistent
iptables-persistent

ll /sbin/iptables-restore
lrwxrwxrwx 1 root root 13 Nov 8 2014 /sbin/iptables-restore -> xtables-multi

looks /sbin/iptables-restore already exists, pointing to xtables-multi

seems to be an old file that created back in 2014, following an old tutorial to persist iptables rules.

sudo grep -rn iptables-restore /etc/
/etc/rc.local:24:/sbin/iptables-restore < /etc/iptables/rules.v4

iptables-restore should be generated dynamically.

removed /sbin/iptables-restore synlink.

and apt-get remove netfilter-persistent iptables-persistent

reinstall netfilter-persistent iptables-persistent is ok.

everything is gonna work.

Written by

自由撰稿人,时评人,平等公义追求者

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store