From f9850a2264f4392fc1b7d9af45d22584948c8ada Mon Sep 17 00:00:00 2001 From: Yann Autissier Date: Tue, 20 Jun 2023 17:49:04 +0200 Subject: [PATCH] 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. --- src/firewall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/firewall.py b/src/firewall.py index 310d263c6..392678fe1 100644 --- a/src/firewall.py +++ b/src/firewall.py @@ -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"))