本帖最后由 风声无为 于 2018-12-15 04:26 编辑
你可以找到nginx目录,然后log中找到访问比较多的ip,或者输入以下命令:
netstat -n | awk '/^tcp/ {n=split($(NF-1),array,":");if(n<=2)++S[array[(1)]];else++S[array[(4)]];++s[$NF];++N} END {for(a in S){printf("%-20s %s\n", a, S[a]);++I}printf("%-20s %s\n","TOTAL_IP",I);for(a in s) printf("%-20s %s\n",a, s[a]);printf("%-20s %s\n","TOTAL_LINK",N);}'
看看链接数过大的就是cc你的, 排除到各种cdn节点外,如果你用的是阿里云的,直接到安全组里面把对应的ip屏蔽就可以了,很简单方便.
腾讯云也有同样的设置,都是大同小异. |