Skip to content

Instantly share code, notes, and snippets.

@jameskyle
Created June 6, 2014 22:38
Show Gist options
  • Select an option

  • Save jameskyle/ab0f57728054693c7df1 to your computer and use it in GitHub Desktop.

Select an option

Save jameskyle/ab0f57728054693c7df1 to your computer and use it in GitHub Desktop.
[Unit]
Description=Packet Filtering Framework
DefaultDependencies=no
After=systemd-sysctl.service
Before=sysinit.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/iptables-restore /etc/iptables.rules
ExecReload=/usr/sbin/iptables-restore /etc/iptables.rules
ExecStop=/usr/sbin/iptables --flush
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment