当前位置: 首页 > news >正文

wpcomments post.php,垃圾评论带来的流量流失

11月底收到一条短信提示,

说空间流量在月底前用光了,

之前每个月的流量最多用掉50%,

真实访问量没有增加的前提下怎么会20天用掉7.5G的流量,

因为11月底换了新空间,新空间的月流量为15G,

所以对于流量的流失也没有太在意,

谁换到新空间以后流量跑的更惊人了。

81fdc5a6847d14144b3fafda8386f3c2.png

12月3日竟然一天跑掉将近1G的流量,

长此以往有100g流量也不够用啊,

所以开始着手研究流量为什么跑掉。

流量为什么跑掉

还好,用的空间给提供最近3天的主机日志,

通过日志发现,流量是被来自福建莆田的一个不停更换ip地址的服务器每天数十万次垃圾请求给好用光的。

目测这个服务器是在一个拨号网络中,每隔一段时间会自动重新拨号以更换IP。

这台主机每天访问我的网站大概有30w次以上。

以下是截取了每天访问日志的冰山一角

59.58.159.32 [04/Dec/2013:14:55:18 GET /wordpress-ajax-comment-post

59.58.159.32 [04/Dec/2013:14:55:19] GET /wordpress-ajax-comment-post

59.58.159.32 [04/Dec/2013:14:55:19] GET /play-flv-in-html/

59.58.159.32 [04/Dec/2013:14:55:19] GET /play-flv-in-html

59.58.159.32 [04/Dec/2013:14:55:19] POST /wp-comments-post.php

59.58.159.32 [04/Dec/2013:14:55:19] GET /wordpress-ajax-comment-post/

59.58.159.32 [04/Dec/2013:14:55:19] GET /jquery-ctrl-enter-submit-form HTTP/1.1

59.58.159.32 [04/Dec/2013:14:55:19 POST /wp-comments-post.php

整个过程很简单,其实就是探测你当前的页面看看,然后再到你的评论提交页面提交垃圾评论。

这样很不容易被认定为是攻击访问。

从wp-comments-post.php入手

因为当前自制的主题是ajax提交评论的,所以对WordPress 自带的评论提交没有需求,

所以开始的时候我是直接将该页面删除了。

结果,所有请求都跳转到主题404页面,流量流失的更惨重了,所以失败!

从.htaccess入手

经过几番波折打算用.htaccess直接暴力屏蔽掉所有来自福建莆田的页面请求

这次流量下降明显,每天的流量降至300M多,每个月差不多也就10G左右的流量,

还是能够接受的。

具体的做法就是利用设置屏蔽来自福建莆田的几个IP段的请求,将请求都转至403页面

下面把.htaccess文件共享出来顺便感谢一下原作者

非黑白的生活-> 《垃圾来袭》

order allow,deny

allow from all

deny from 108.162.216.

deny from 110.85.102.

deny from 110.85.106.

deny from 110.85.107.

deny from 110.85.113.

deny from 110.85.114.

deny from 110.85.115.

deny from 110.85.68.

deny from 110.85.69.

deny from 110.85.70.

deny from 110.85.72.

deny from 110.85.104.

deny from 110.86.165.

deny from 110.86.167.

deny from 110.86.185.

deny from 110.89.13.

deny from 110.89.34.

deny from 110.89.35.

deny from 110.89.46.

deny from 110.89.52.

deny from 110.89.53.

deny from 110.89.60.

deny from 110.89.61.

deny from 110.89.9.

deny from 112.111.160.

deny from 112.111.188.

deny from 112.111.189.

deny from 112.111.190.

deny from 117.26.117.

deny from 117.26.118.

deny from 117.26.119.

deny from 117.26.192.

deny from 117.26.193.

deny from 117.26.195.

deny from 117.26.200.

deny from 117.26.201.

deny from 117.26.202.

deny from 117.26.203.

deny from 117.26.248.

deny from 117.26.252.

deny from 117.26.254.

deny from 117.26.76.

deny from 117.26.77.

deny from 117.26.78.

deny from 117.26.79.

deny from 117.26.85.

deny from 117.26.86.

deny from 120.33.240.

deny from 120.33.241.

deny from 120.33.242.

deny from 120.33.243.

deny from 120.37.208.

deny from 120.37.210.

deny from 120.37.211.

deny from 120.37.216.

deny from 120.37.226.

deny from 120.37.228.

deny from 120.37.234.

deny from 120.37.238.

deny from 120.37.243.

deny from 120.40.148.

deny from 120.40.149.

deny from 120.40.150.

deny from 120.43.10.

deny from 120.43.26.

deny from 120.43.30.

deny from 120.43.4.

deny from 120.43.6.

deny from 120.43.8.

deny from 121.205.196.

deny from 121.205.198.

deny from 121.205.199.

deny from 121.205.215.

deny from 121.205.239.

deny from 121.205.242.

deny from 121.205.243.

deny from 121.205.247.

deny from 121.205.248.

deny from 121.207.140.

deny from 123.116.37.

deny from 139.227.62.

deny from 14.18.171.

deny from 175.42.92.

deny from 175.44.59.

deny from 182.118.20.

deny from 182.118.21.

deny from 182.118.22.

deny from 182.118.25.

deny from 218.85.146.

deny from 218.86.50.

deny from 218.86.51.

deny from 220.161.96.

deny from 220.161.127.

deny from 222.77.205.

deny from 222.77.206.

deny from 222.77.207.

deny from 222.77.212.

deny from 222.77.214.

deny from 222.77.225.

deny from 222.77.228.

deny from 222.77.229.

deny from 222.77.238.

deny from 222.77.246.

deny from 222.77.247.

deny from 27.150.223.

deny from 27.150.229.

deny from 27.153.128.

deny from 27.153.160.

deny from 27.153.161.

deny from 27.153.162.

deny from 27.153.163.

deny from 27.153.184.

deny from 27.153.185.

deny from 27.153.186.

deny from 27.153.187.

deny from 27.153.209.

deny from 27.153.218.

deny from 27.153.219.

deny from 27.153.228.

deny from 27.153.233.

deny from 27.153.249.

deny from 27.153.250.

deny from 27.153.251.

deny from 27.154.206.

deny from 27.159.195.

deny from 27.159.197.

deny from 27.159.205.

deny from 27.159.209.

deny from 27.159.211.

deny from 27.159.229.

deny from 27.159.231.

deny from 27.159.238.

deny from 27.159.254.

deny from 36.248.168.

deny from 36.248.171.

deny from 36.250.182.

deny from 58.23.237.

deny from 59.58.113.

deny from 59.58.136.

deny from 59.58.137.

deny from 59.58.138.

deny from 59.58.139.

deny from 59.58.158.

deny from 60.168.18.

相关文章:

  • H3C基本命令学习
  • Linux下oracle em安装,手动安装em(redhat 5/oracle 11g)
  • 马宁的Windows Mobile开发培训概述
  • oracle非归档恢复,非归档模式恢复数据库__oracle_ORA_DISK_channel_dbf_PROD__169IT.COM
  • 错误:文件被数字签名策略拒绝(File was rejected by digital signature policy)
  • Oracle数据所属表分区,oracle数据库表分区
  • 推荐两个免费下载Smartphone桌面主题的网站
  • matlab中产生对角阵,关于matlab中的diag函数(矩阵对角元素的提取和创建对角阵)
  • 找回“显示桌面” 图标 显示图标.scf
  • 查询oracle物化视图日志,oracle物化视图日志系列(一)
  • 使用Windows Mobile Test Framework进行Windows Mobile程序的自动化测试 - (2) 小试牛刀
  • linux cc脚本,LINUX:CentOS防CC攻击脚本
  • linux系统实用脚本,常用linux系统命令及简单小脚本
  • 调用JNI的程序 生成JAR包后的部署问题
  • linux网卡信息eno,gentoo linux 网卡eno1677736修改成eth0 的方法
  • 【每日笔记】【Go学习笔记】2019-01-10 codis proxy处理流程
  • 【跃迁之路】【444天】程序员高效学习方法论探索系列(实验阶段201-2018.04.25)...
  • ➹使用webpack配置多页面应用(MPA)
  • CentOS学习笔记 - 12. Nginx搭建Centos7.5远程repo
  • GraphQL学习过程应该是这样的
  • JS正则表达式精简教程(JavaScript RegExp 对象)
  • Just for fun——迅速写完快速排序
  • leetcode388. Longest Absolute File Path
  • Spring框架之我见(三)——IOC、AOP
  • Terraform入门 - 1. 安装Terraform
  • vue 个人积累(使用工具,组件)
  • vue2.0开发聊天程序(四) 完整体验一次Vue开发(下)
  • Webpack 4 学习01(基础配置)
  • 对JS继承的一点思考
  • 搞机器学习要哪些技能
  • 看图轻松理解数据结构与算法系列(基于数组的栈)
  • 删除表内多余的重复数据
  • 听说你叫Java(二)–Servlet请求
  • 问题之ssh中Host key verification failed的解决
  • 硬币翻转问题,区间操作
  • 用 vue 组件自定义 v-model, 实现一个 Tab 组件。
  • Nginx实现动静分离
  • shell使用lftp连接ftp和sftp,并可以指定私钥
  • # include “ “ 和 # include < >两者的区别
  • # 数据结构
  • #ubuntu# #git# repository git config --global --add safe.directory
  • (07)Hive——窗口函数详解
  • (LeetCode 49)Anagrams
  • (附源码)计算机毕业设计SSM基于java的云顶博客系统
  • (三)模仿学习-Action数据的模仿
  • (原创) cocos2dx使用Curl连接网络(客户端)
  • .mat 文件的加载与创建 矩阵变图像? ∈ Matlab 使用笔记
  • .mysql secret在哪_MySQL如何使用索引
  • .NET 5.0正式发布,有什么功能特性(翻译)
  • .NET 表达式计算:Expression Evaluator
  • .NET/C# 编译期间能确定的相同字符串,在运行期间是相同的实例
  • .net和php怎么连接,php和apache之间如何连接
  • .NET框架
  • .net网站发布-允许更新此预编译站点
  • @RequestBody与@ResponseBody的使用