Feb 07
GAE上的博客经常受到垃圾评论的骚扰,可以将留言的IP添加到GAE的DoS里面,具体步骤很简单,新建一个dos.yaml文件,代码如下:
blacklist: - subnet: 1.2.3.4 description: a single IP address - subnet: 1.2.3.4/24 description: an IPv4 subnet - subnet: abcd::123:4567 description: an IPv6 address - subnet: abcd::123:4567/48 description: an IPv6 subnet
GAE官方的解释如下:
A dos.yaml file in the root directory of your application (alongside app.yaml) configures DoS Protection Service blacklists for your application. The following is an example dos.yaml file:
The syntax of dos.yaml is the YAML format. For more information about this syntax, see the YAML website.
A dos.yaml file consists of a number of blacklist entries. A blacklist entry has a subnet, and can optionally specify a description. The description will be visible in the Admin Console. The subnet is any valid IPv4 or IPv6 subnet in CIDR notation.
Recent Comments