• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ithelloworld
V2EX  ›  程序员

一台新的VPS,搭建了LAMP环境,如何做最基本的安全设置?

  •  
  •   ithelloworld · May 24, 2013 · 5271 views
    This topic created in 4912 days ago, the information mentioned may be changed or developed.
    CentOS 6 + Apache + MySQL + PHP

    最简单实用的安全设置怎么做?

    当然用软件也好,如nagios。不用那个,手动配置呢?
    9 replies  •  1970-01-01 08:00:00 +08:00
    AstroProfundis
    AstroProfundis
    May 24, 2013❤️4
    1
    ssh 改到非标准端口,禁用密码登录只用密钥,装fail2ban,装iptables
    常用的基本手段大概就这些了吧...反正我只用了这些,个人用也不需要搞得多复杂,太麻烦了...
    crazybubble
    crazybubble
    May 24, 2013❤️4
    2
    你可以看一下这篇文章 前阵子Hacker News上看到的:
    http://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers
    rhwood
    rhwood
    May 24, 2013❤️2
    3
    一般是这样的。
    1 改ssh端口,设置其他2台机器可以密钥登录,然后把这个vps的ssh密码登录关了。
    2 lamp环境下装mod_security,可以用现成的安全规则比如 GotRoot
    3 该用的服务都装好后,在投入生产前装csf防火墙,csf比较傻瓜或者人性化,装好了,它会把listen的端口自动加到配置文件里允许打开的端口,其他不用的端口就关了,lfd还可以防止暴力破解
    molinxx
    molinxx
    May 24, 2013 via Android❤️1
    4
    根据常见的网络攻击合理设置Apache参数,有条件可以上CDN
    ithelloworld
    ithelloworld
    OP
    May 24, 2013
    5
    @AstroProfundis
    @crazybubble
    @rhwood
    @molinxx
    谢谢回答!很好的参考。
    wtbhk
    wtbhk
    May 24, 2013
    6
    Mark
    marchtea
    marchtea
    May 24, 2013
    7
    mark
    ithelloworld
    ithelloworld
    OP
    May 24, 2013❤️1
    8
    又得知一个软件:ModSecurity

    让mark此主题的人多获取有用的东西吧,让此主题成为wiki!
    ithelloworld
    ithelloworld
    OP
    May 24, 2013
    9
    linode的关于安全的文档:https://library.linode.com/security/basics
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5408 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 02:06 · PVG 10:06 · LAX 18:06 · JFK 21:06
    ♥ Do have faith in what you're doing.