Add iptables systemd units
authorStefan Huber <shuber@sthu.org>
Sat, 4 Jan 2014 20:20:25 +0000 (21:20 +0100)
committerStefan Huber <shuber@sthu.org>
Sat, 4 Jan 2014 20:20:25 +0000 (21:20 +0100)
systemd/ip6tables.service [new file with mode: 0644]
systemd/iptables.service [new file with mode: 0644]

diff --git a/systemd/ip6tables.service b/systemd/ip6tables.service
new file mode 100644 (file)
index 0000000..4c16a4e
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=ip6tables
+Before=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=/etc/conf.d/ip6tables
+ExecStart=/sbin/ip6tables-restore ${SAVE_RESTORE_OPTIONS} ${IP6TABLES_SAVE}
+ExecStop=/sbin/ip6tables-save ${SAVE_RESTORE_OPTIONS} ${IP6TABLES_SAVE}
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/systemd/iptables.service b/systemd/iptables.service
new file mode 100644 (file)
index 0000000..46f08ff
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=iptables
+Before=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=/etc/conf.d/iptables
+ExecStart=/sbin/iptables-restore ${SAVE_RESTORE_OPTIONS} ${IPTABLES_SAVE}
+ExecStop=/sbin/iptables-save ${SAVE_RESTORE_OPTIONS} ${IPTABLES_SAVE}
+
+[Install]
+WantedBy=multi-user.target