Linux防止暴力破解的一种方法
SofM 2020-03-20 15:26:24
修改/etc/hosts.allow和/etc/hosts.deny的配制,来允许或者拒绝哪些IP、主机、用户可以访问。
比如我们在 /etc/hosts.allow中加入sshd:192.168.10.
这样就会允许来自192.168.10.*网段的所有的客户来访问。
如果我们在 /etc/hosts.deny中加入sshd:all,就限制了所有IP地址访问。
当hosts.allow和 host.deny相冲突时,以hosts.allow设置优化。