因此,我今天在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
我在虚拟机上配置了SFTP,因为我想测试如何使用symlink从用户主目录访问外部文件。
我创建了用户:
test:x:1003:1001::/var/www/test/public:/bin/false
所有权和预演:
drwxr-xr-x root root test
drwxr-xr-x test sftpusers public
这是我的sshd_config:
Subsystem sftp internal-sftp
#UsePAM no
Match group sftpusers
ChrootDirectory /var/www/%u
AuthorizedKeysFile