安装和配置fail2ban后,我尝试使用错误的密码通过ssh登录我的服务器。经过几次尝试,我尝试使用正确的密码成功。所以,fail2ban 没有禁止用户 ip 允许他登录。不管我设置了什么规则,maxretry = 1 等等。
我的 iptables -L 输出:
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-SSH (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Run Code Online (Sandbox Code Playgroud)
这是调试日志,不完整的版本如下:
root@host:~# fail2ban-client -v -v -v start
DEBUG Reading configs for /etc/fail2ban/fail2ban under /etc/fail2ban
DEBUG Reading config files: /etc/fail2ban/fail2ban.conf
DEBUG Reading …Run Code Online (Sandbox Code Playgroud) 我通常设置一个本地 DNS 服务器来首先在本地解析,然后转发到公共 DNS。
我的架构使用以下命名约定(我将“开发”作为子域作为正在进行的项目的前缀):
我注意到其他人会这样做http://www.foo.com.local这有什么原因吗?我的方法错了吗?
感谢您的关注!