summaryrefslogtreecommitdiffstats
path: root/projectroot/lib/systemd/system/iptables.service
diff options
context:
space:
mode:
Diffstat (limited to 'projectroot/lib/systemd/system/iptables.service')
-rw-r--r--projectroot/lib/systemd/system/iptables.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/projectroot/lib/systemd/system/iptables.service b/projectroot/lib/systemd/system/iptables.service
new file mode 100644
index 000000000..fa4a8b367
--- /dev/null
+++ b/projectroot/lib/systemd/system/iptables.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Packet Filtering Framework
+DefaultDependencies=no
+After=systemd-sysctl.service
+Before=sysinit.target
+ConditionFileNotEmpty=/etc/iptables/rules.v4
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/iptables-restore /etc/iptables/rules.v4
+ExecReload=/usr/sbin/iptables-restore /etc/iptables/rules.v4
+ExecStop=/usr/sbin/iptables-flush
+RemainAfterExit=yes
+[Install]
+WantedBy=multi-user.target