keep fail2ban rules on firewall reload (#1661)

* keep fail2ban rules on firewall reload

reloading firewall flushes all iptables rules to create new ones,
dropping fail2ban rules in the same time.

* restart fail2ban instead of reload

Reloading fail2ban does not create f2b-* iptables rules.
This commit is contained in:
Yann Autissier 2023-06-20 17:49:04 +02:00 committed by GitHub
parent d69c196fe4
commit f9850a2264
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -331,7 +331,7 @@ def firewall_reload(skip_upnp=False):
# Refresh port forwarding with UPnP
firewall_upnp(no_refresh=False)
_run_service_command("reload", "fail2ban")
_run_service_command("restart", "fail2ban")
if errors:
logger.warning(m18n.n("firewall_rules_cmd_failed"))