fail2ban 自启动后会导致 firewalld 无法自启动.

fail2ban 自启动后会导致 firewalld 无法自启动.

1
systemctl restart firewalld.service

会遇到如下报错

1
Failed to restart firewalld.service: Transaction contains conflicting jobs 'restart' and 'stop' for fail2ban.service. Probably contradicting requirement

123

可以通过如下步骤重启

方法一:

1
2
3
systemctl stop fail2ban.service
systemctl restart firewalld.service
systemctl start fail2ban.service

方法二:

1
2
systemctl stop firewalld.service
systemctl start firewalld.service

123

最后通过如下方法让其开机自启动

1
chmod +x /etc/rc.d/rc.local       //让其可执行
1
vi /etc/rc.d/rc.local

最后面加入

1
systemctl stop fail2ban.service  &&  systemctl restart firewalld.service  && systemctl restart fail2ban.service

123
123

Leave a Reply

Your email address will not be published. Required fields are marked *