summaryrefslogtreecommitdiff
path: root/packages/net-firewall/iptables/files/systemd/iptables.service
blob: e5d46c47e39630b0acbfe1bf2e686a398f5539ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Copyright 2011 Vasiliy G Tolstov <v.tolstov@selfip.ru>
# Distributed under the terms of the GNU General Public License v2

[Unit]
Description=iptables
Before=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=-/sbin/iptables-restore -c /var/lib/iptables/rules-save ; -/sbin/ip6tables-restore -c /var/lib/ip6tables/rules-save
ExecStop=/bin/sh -c "/sbin/iptables-save -c > /var/lib/iptables/rules-save" ; /bin/sh -c "/sbin/ip6tables-save -c > /var/lib/ip6tables/rules-save"

[Install]
WantedBy=multi-user.target