在配置为deny的文件夹中有一个.htaccess文件,允许如下所示:
Order deny,allow
Deny from all
Allow from <whitelist IP>
Allow from <whitelist IP>
....
该文件中没有其他重写等规则,只有拒绝/允许内容。
如果您试图从拒绝的IP转到http://www.xyz.site/protected/ (没有文件名),您将得到预期的禁止错误。但是,如果您转到http://www.xyz.site/protected/filename.php --其中filename.php是文件夹中的一个
我的带有fail2ban和UFW的服务器运行得很好。但现在我意识到,当连接被"past MaxStartups“丢弃时,IP地址似乎并没有被禁止。我的auth.log看起来像Feb 26 23:19:42 SFTPSERVER sshd2719: drop connection #10 from 1xx.1xx.xx.xx:57970 on xx.xx:22 on
在fail2ban.log中,没有该ip的条目。因此,此登录条目似乎未按fail2ban进行过滤。如何为此日志条目添加筛选器?我必须向我的fail2ban文件夹的filter.d中的sshd.conf添加一些正则表达式吗?
因此,我今天在ssh上测试了Fail2ban,它使用了一个以前从未连接到服务器的IP。
首先,我在默认配置中(除了邮件地址之外)唯一更改的是以下内容:
# Choose default action. To change, just override value of 'action' with the
# interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
# globally (section [DEFAULT]) or per speci