码迷,mamicode.com
首页 > 其他好文 > 详细

使用fail2ban禁止暴力破解SSH

时间:2015-07-14 20:52:06      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:

有时候很懒,又看不得别人一直在尝试SSH端口。

尝试用了下fail2ban这个软件,简单粗暴正是我们想要的效果。

yum install fail2ban -y //epel

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

vim /etc/fail2ban/jail.local

# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not

# ban a host which matches an address in this list. Several addresses can be

# defined using space separator.  //多个IP使用空格分开,这个就是白名单了。

ignoreip = 127.0.0.1/8 1.2.3.4

service fail2ban start

嗯,就这样。



使用fail2ban禁止暴力破解SSH

标签:

原文地址:http://my.oschina.net/longquan/blog/478511

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!