[Unit] Description=Save iptables firewall DefaultDependencies=no After=iptables.service # fail immediately if iptables.service has not been started Requisite=iptables.service Before=shutdown.target [Service] Type=oneshot RemainAfterExit=no ExecStart=/usr/local/lib/iptables-helper save [Install] WantedBy=shutdown.target