[Unit]
Description=Applies iptables rules to block known IPs doing nasty stuff"
Documentation=https://badips.com
PartOf=SuSEfirewall2.service firewalld.service
# must not run in parallel to service that modify iptables without "-w"
Before=fail2ban.service
Before=libvirtd.service
After=network.target

[Service]
Type=oneshot
EnvironmentFile=/etc/block-badips.conf
ExecStart=/usr/sbin/block-badips.sh
Restart=on-failure
RestartSec=60

[Install]
WantedBy=multi-user.target
