From 17084a1d60cec9afc0d1f3e69128d7f40c1bb24e Mon Sep 17 00:00:00 2001 From: Yann Autissier Date: Sat, 20 May 2023 17:09:35 +0000 Subject: [PATCH] restart fail2ban instead of reload Reloading fail2ban does not create f2b-* iptables rules. --- hooks/post_iptable_rules/52-fail2ban | 5 ----- src/firewall.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100755 hooks/post_iptable_rules/52-fail2ban diff --git a/hooks/post_iptable_rules/52-fail2ban b/hooks/post_iptable_rules/52-fail2ban deleted file mode 100755 index f350dbf7b..000000000 --- a/hooks/post_iptable_rules/52-fail2ban +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -e - -systemctl restart fail2ban 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"))