新開 VPS 的簡易安全守則
allientNeko
话题数:161会员, 大佬
我把知道的全寫在這
如果有更好的方法 有請各位來補完
SSH server
1. ssh 儘量用 key login
2. 關掉 root login
3. 可以的話 不要用 port 22
4. 一定要先安裝 fail2ban
封鎖 mail port
1. 特別是有開SS/SSR V2Ray的 如果用不到port 25 465 587 不用 mail 的全封了
(
我都用 iptables 直接封
iptables -A OUTPUT -p tcp --match multiport --dport 25,465,587 -j REJECT
如果有更好的方法
請各位明示一下
)
學會用 fail2ban
https://www.linode.com/docs/security/using-fail2ban-for-security
https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-14-04
2factor-auth:
https://github.com/google/google-authenticator-libpam
https://duo.com/
password management:
https://www.passwordstore.org/
https://github.com/jysperm/passwords
http://keepass.info/
评论
2.记录所有公钥的sha256和md5指纹,日后核对
3.学习使用selinux/apparmor
4.开启二步验证(google-authenticator-libpam)
5.定时更新系统
6.只添加自己信任的仓库(repository),添加仓库时尽量核对gpg公钥
都没有人用过两步验证吗?
duo.com
美国KT/zenlayer、欧洲/北美高防服务器/CDN,各国CN2,联系QQ:4600897
新玩意
等我好好研究一下
不過這樣不就每一台機器都要開一個 2factor 了嗎?
2 Factor Authorization for ssh:
https://www.digitalocean.com/community/tutorials/how-to-set-up-multi-factor-authentication-for-ssh-on-ubuntu-16-04
Kerberos
https://help.ubuntu.com/community/Kerberos
还有这一篇我都觉得不错
刚安装完Debian必做的事
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-debian-8
哇,原来还有google2步验证,感谢楼主,你不说还真不知道
改默认端口,密码复杂点就可以了,如果纯搭个梯子
放個 fail2ban
https://krypt.co/
手機驗證法
用key更方便一些
主机公园 出售C3|Zenlayer洛杉矶CN2VPS/服务器
想当初自己的linode一天就被扫端口成肉鸡:(
其实禁止root登录 + Key基本就够了
的确是这样。