apt install iptables-persistent -y
/usr/sbin/service netfilter-persistent save
/usr/sbin/iptables-save > /etc/iptables.up.rules
/usr/sbin/iptables-save > /etc/iptables/rules.v4
/usr/sbin/iptables-save > /etc/iptables/rules.v6
/usr/sbin/iptables-restore < /etc/iptables/rules.v4
/usr/sbin/iptables-restore < /etc/iptables/rules.v6
service iptables save
Добавляю применение правил в файл /etc/network/interfaces:
iface enp5s0 inet manual post-up iptables-restore < /etc/iptables.rules