Fail2ban with firewalld几个关键点

mv /etc/fail2ban/jail.d/00-firewalld.conf /etc/fail2ban/jail.d/00-firewalld.local

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

banaction = iptables-multiport
banaction_allports = iptables-allports
替换成
banaction = firewallcmd-rich-rules[actiontype=]
banaction_allports = firewallcmd-rich-rules[actiontype=]

jail.d下新建sshd.local,内容为
[sshd]

enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s
bantime = 1d
findtime = 10m
maxretry = 5

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注