无法重新启动 fail2ban.service:未找到单元 firehol.service

无法重新启动 fail2ban.service:未找到单元 firehol.service

卸载 Firehol 后遇到此错误。请检查是否存在此阻止:

[Unit]
# Starting fail2ban will automatically start firehol before it.
# Stopping firehol will automatically stop fail2ban before it.
BindsTo=firehol.service
After=firehol.service

/etc/systemd/system/fail2ban.service.d/override.confsystemctl edit fail2ban

如果有,请删除它并启动/重新启动 fail2ban 服务。有时,我们需要撤消按照文档

答案1

删除如上突出显示的块并运行:

systemctl daemon-reload

您可以运行fail2ban-client status来确认fail2ban状态

相关内容