Skip to content

Instantly share code, notes, and snippets.

@psftw
Created November 19, 2015 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psftw/bcf48f416375d7f09a89 to your computer and use it in GitHub Desktop.
Save psftw/bcf48f416375d7f09a89 to your computer and use it in GitHub Desktop.
$ sctl cat iptables-store
# /usr/lib64/systemd/system/iptables-store.service
[Unit]
Description=Store iptables firewall rules
Before=shutdown.target
DefaultDependencies=No
[Service]
Type=oneshot
ExecStart=/bin/sh -c "/sbin/iptables-save --counters > /var/lib/iptables/rules-save"
[Install]
WantedBy=shutdown.target
# /etc/systemd/system/iptables-store.service.d/override.conf
[Unit]
Before=docker.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment