Chinaunix首页 | 论坛 | 博客
  • 博客访问: 62768
  • 博文数量: 38
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 396
  • 用 户 组: 普通用户
  • 注册时间: 2015-07-12 14:46
文章分类

全部博文(38)

文章存档

2016年(11)

2015年(27)

我的朋友
最近访客

分类: LINUX

2015-08-07 11:01:20

怎么样使远程连接时更加安全呢?


不用root登陆使用普通用户登陆后再转换为root

限制登陆用户

不使用默认端口22

使用vpn

使用足够复杂的密码,经常换密码

以上方法多很不错、下面介绍一种防止暴力破解的软件fail2ban吧。

下载地址: />
接下来就不说废话了

解压安装fail2ban

[root@super63 ~]# tar zxvf fail2ban-0.8.14.tar.gz

[root@super63 ~]# cd fail2ban-0.8.14

[root@super63 fail2ban-0.8.14]# python -V

[root@super63 fail2ban-0.8.14]# python setup.py install

 

配置服务器动动脚本:

[root@super63 fail2ban-0.8.14]# cp ./files/redhat-initd /etc/init.d/fail2ban

 

加入开机启动:

[root@super63 fail2ban-0.8.14]# chkconfig --add fail2ban


fail2ban配置文件:

[root@super63 ~]# vim /etc/fail2ban/jail.conf
。。。。。。。

查看配置状况:

[root@super63 ~]# iptables -L -n

[root@super63 fail2ban]# fail2ban-client status

[root@super63 fail2ban]# fail2ban-client status ssh-iptables


查看日志:

[root@super63 fail2ban]# tail /var/log/fail2ban.log



非默认端口下配置fail2ban防止暴力破解???

这三个地方与默认端口相关的修改一下就可以了
 /etc/fail2ban/jail.conf

 /etc/fail2ban/action.d/iptables.conf

 /etc/fail2ban/jail.conf




阅读(527) | 评论(0) | 转发(0) |
0

上一篇:SSH服务

下一篇:nfs实现共享存储

给主人留下些什么吧!~~