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
|