Newer Older
10 lines | 0.312kb
initial commit
admin cloud-section (root) authored on 2016-12-10
1
[Unit]
2
Description=Manage firewall stop/start
3
#After=fail2ban.service
4

            
5
[Service]
6
ExecStart=/usr/bin/awk '!/^\s*(#.*|$)/{print $0; system("/sbin/iptables " $0)}' /root/iptables.rules
7
ExecStop=/usr/bin/awk '!/^\s*(#.*|$)/{system("/sbin/iptables " $0)}' /root/iptables.norules
8

            
9
[Install]
10
WantedBy=multi-user.target