IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Shell防DDOS攻击原理

    shentou发表于 2016-05-31 11:57:10
    love 0

    人生苦短,我用Python!Life is too short,I use Python!

    Shell防DDOS攻击原理

    #!/bin/sh #date:2015-12-13 #filename:fang-DOS.sh  #version:v1.0 while true do     #awk '{print $1}' access_2015-12-15.log|grep -v "^$"|sort|uniq -c >/tmp/tmp.log     netstat -an|grep EST|awk -F '[ :]+' '{print $6}'|sort|uniq -c >/tmp/tmp.log      exec </tmp/tmp.log     while read line     do         ip=`echo $line|awk '{print $2}'`         count=`echo $line|awk '{print $1}'`         if [ $count -gt 3 ] && [ `iptables -L -n|grep "$ip"|wc -l` -lt 1 ]           then                iptables -I INPUT -s $ip -j DROP               echo "$line is dropped" >>/tmp/droplist.log         fi     done        sleep 5   done 

    更多内容请访问李兴利博客

    转载请注明: 境,无止境 »Shell防DDOS攻击原理

    分享到:

    上一篇

    Django admin美化-grappelli

    下一篇

    Shell-WEB网站目录监控

    Shell防DDOS攻击原理
    境,无止境

    Thoughts, stories and ideas.

    境,无止境

    不妨用手机扫描下面的二维码访问本网站:

    Shell防DDOS攻击原理

    标签云

    网络 LVS English Kali linux ARP 渗透 java tomcat mysql nginx django shell CSS HTML ghost Linux Python 前端

    友情链接
    • Ghost中国
    • 开源中国
    • Ghost Blog
    • Git@OSC
    • CSDN
    • Materialize
    • Medium
    • 付生保博客
    • jFinal
    • Image Notes
    • Shawn’s Blog


沪ICP备19023445号-2号
友情链接