有效防止暴力破解:怎样更改密码,能够防止暴力破解
怎样更改密码,能够防止暴力破解 (一)
![怎样更改密码,能够防止暴力破解](/uploads/imgages/?ATMAzP90aXRsZT3mgI7moLfmm7TmlLnlr4bnoIHvvIzog73lpJ/pmLLmraLmmrTlipvnoLTop6M=.jpg)
答自家wifi防止万能解锁破解,可以采取以下手段:
1、隐藏网络名(即网络SSID),这样可以保证wifi不曝露在别人的视野中,可以在一定程度上防止破解。
2、提高wifi密码强度,使用大小写字母、特殊符号和数字全有的组合,并加长密码长度,这样可以极大的提高暴力破解的难度,如果能定期更改wifi密码,可以达到更好的效果。
3、对于无线网的接入请求,做mac地址过滤,阻止设定规则之外的设备接入,这是最有效的防止wifi被破解的方法。
如何防止SSH暴力破解 (二)
答SSH防暴力破解的解决方法:
1、禁止root用户ssh登陆;
1.1、修改PermitRootLogin项:
[root@localhost ~]# vi /etc/ssh/sshd_config
[root@localhost ~]# grep Root /etc/ssh/sshd_config
PermitRootLogin no ### 将默认的 #PermitRootLogin yes 修改成这样的 ###
# the setting of "PermitRootLogin without-password".
[root@localhost ~]# vi /etc/ssh/sshd_config
[root@localhost ~]# grep Root /etc/ssh/sshd_config
PermitRootLogin no ### 将默认的 #PermitRootLogin yes 修改成这样的 ###
# the setting of "PermitRootLogin without-password".
1.2、重启sshd服务
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
2、修改ssh默认端口22;
2.1、将默认端口22修改为自定义的2020端口
[root@localhost ~]# vi /etc/ssh/sshd_config
[root@localhost ~]# grep Port /etc/ssh/sshd_config
Port 2020
#GatewayPorts no
[root@localhost ~]# vi /etc/ssh/sshd_config
[root@localhost ~]# grep Port /etc/ssh/sshd_config
Port 2020
#GatewayPorts no
2.2、在防火墙中加入2020端口的策略
[root@localhost ~]# vi /etc/sysconfig/iptables
[root@localhost ~]# grep 2020 /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2020 -j ACCEPT
[root@localhost ~]# vi /etc/sysconfig/iptables
[root@localhost ~]# grep 2020 /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2020 -j ACCEPT
2.3、重启防火墙策略
[root@localhost ~]# /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: nat filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
[root@localhost ~]# /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: nat filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]
2.4、重启sshd服务
[root@localhost ~]# /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
看完本文,相信你已经对暴力破解的防御有所了解,并知道如何处理它了。如果之后再遇到类似的事情,不妨试试酷斯法推荐的方法去处理。