linux/conf/systemd/iptables.service

14 lines
298 B
INI
Raw Permalink Normal View History

2014-11-02 21:33:12 +01:00
[Unit]
2015-10-03 12:37:31 +02:00
Description=iptables
2014-11-02 21:33:12 +01:00
Before=network.target
[Service]
Environment=CONFIG=/etc/iptables.rules
ExecStart=/bin/sh -c 'iptables -F; iptables-restore -c < ${CONFIG}'
ExecStop=/bin/sh -c 'iptables-save -c > ${CONFIG}; iptables -F'
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=basic.target