We provision servers with chef so we have same configuration for Ubuntu 16.04 and 18.04 versions.
And there is same rule for restoring iptables rules
/sbin/iptables-restore < /etc/iptables/general
but it doesn't work for Ubuntu 18.04.
If I run it manually it works. Does it mean this script isn't running at startup?
I created systemd service as it is described here and it works fine.
[Unit] Description = Apply iptables rules [Service] Type=oneshot ExecStart=/etc/network/if-pre-up.d/iptables_load [Install] WantedBy=network-pre.target