Skip to content

Instantly share code, notes, and snippets.

@tux-00
Created July 23, 2018 17:23
Show Gist options
  • Save tux-00/76c66c654b50cbe81ccd659126c11ae0 to your computer and use it in GitHub Desktop.
Save tux-00/76c66c654b50cbe81ccd659126c11ae0 to your computer and use it in GitHub Desktop.
iptables systemd service file
[Unit]
Description=Add iptables rules
After=systemd-sysctl.service
Before=sysinit.target
[Service]
Type=oneshot
ExecStart=/sbin/iptables-restore /etc/iptables.up.rules
ExecReload=/sbin/iptables-restore /etc/iptables.up.rules
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