summaryrefslogtreecommitdiff
path: root/packages/net-firewall/iptables/files/systemd/iptables.service
blob: d9d0532cf94650d1a17868cb0cd8fb5b87e5541c (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=IPv4/IPv6 firewall with iptables
Before=network.target

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

[Install]
WantedBy=multi-user.target