linux 系统如何防止攻击

linux 系统如何防止攻击

经常看看登录日志:/var/log/secure

看到登录失败的,就当做需要攻防的ip

例如

 Failed password for root from 107.155.66.20 port 44080 ssh2

那么我就应该防ip 107.155.66.20

如何防呢?

使用/etc/hosts.deny 

只要在/etc/hosts.deny  中的ip,都是拒绝访问的:



 

看看使用/etc/hosts.deny  之后的效果:

 

 

附件是hosts.deny文件

猜你喜欢

转载自hw1287789687.iteye.com/blog/2279243