y051313
V2EX  ›  问与答

应对 close_wait 攻击有什么好的办法吗?

  •  
  •   y051313 · Jun 4, 2013 · 4916 views
    This topic created in 4900 days ago, the information mentioned may be changed or developed.
    架在linode上,从下午开始出现了280多个close_wait链接

    已经试过
    vi /etc/sysctl.conf
    # Decrease the time default value for tcp_fin_timeout connection
    net.ipv4.tcp_fin_timeout = 30
    # Decrease the time default value for tcp_keepalive_time connection
    net.ipv4.tcp_keepalive_time = 1800
    # 探测次数
    net.ipv4.tcp_keepalive_probes=2
    # 探测监控秒数
    net.ipv4.tcp_keepalive_intvl=2
    保存退出后执行:sysctl -p
    没用。。。
    5 replies  •  1970-01-01 08:00:00 +08:00
    phuslu
    phuslu
    Jun 4, 2013
    1
    和 TIME_WAIT 不一样, 过多 CLOSE_WAIT 意味程序存在的有问题。
    一般是 server socket 没有即使检测到 client socket 的关闭(close),仍在做 read 操作。
    phuslu
    phuslu
    Jun 4, 2013
    2
    还有,你怎么判断是"攻击"引起的啊?
    y051313
    y051313
    OP
    Jun 4, 2013
    3
    因为去年这个时候发生过一次,还收到了勒索邮件,要求支付多少钱,否则会一直攻击。。。

    另外,我今天没有做任何程序上的改动啊
    raincious
    raincious
    Jun 4, 2013
    4
    上CloudFlare或者其他CDN吧。
    y051313
    y051313
    OP
    Jun 4, 2013
    5
    @raincious 上次是用的coludflare的收费服务解决的。 问题是,我刚刚切换到google page speed上来....
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1371 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 20:44 · PVG 04:44 · LAX 12:44 · JFK 15:44
    ♥ Do have faith in what you're doing.