【问题标题】:Is there a way in google cloud to block attempt to access specific urls谷歌云中有没有办法阻止访问特定网址的尝试
【发布时间】:2021-06-28 12:13:42
【问题描述】:

我有一个 VM 实例,它接收到大量试图破解该实例的垃圾邮件/机器人流量,例如 New Request to /blog/wp-includes/wlwmanifest.xml。尽管这些都没有成功,但它给实例增加了压力。

是否可以阻止谷歌云网络上的特定端点尝试?

到目前为止,我只能找到一种使用防火墙阻止特定 IP 地址的方法。

我在这里寻找类似于答案的东西:https://community.cloudflare.com/t/is-there-a-way-to-prevent-wp-path-probing/204761

【问题讨论】:

  • 欢迎托管公共服务器。这种垃圾流量是正常的,你必须做出相应的计划。如果您正在运行 WordPress,请安装 WordPress 特定的防火墙来阻止这些用户。有数十/数百个框架。黑客尝试了其中的许多。考虑@Serhii 关于 Cloud Armor 的回答。但是,Apache/Nginx 可以毫不费力地处理未找到的错误。您将支付前端/WAF 以阻止流量或在您的后端。面向公众的服务器没有免费的午餐。

标签: google-cloud-platform google-compute-engine firewall server-side-attacks google-cloud-armor


【解决方案1】:

Google Cloud Firewall 适用于 Level 3 OSI model,HTTP/HTTPS 适用于 Level 7 OSI 模型。因此,在这种情况下,您将无法使用 Google Cloud Firewall。

作为一种解决方案,您可以使用适用于 7 级 OSI 模型的 Web Application Firewall (WAF)。 Google Cloud Platform 提供 WAF 即服务:Google Cloud Armor

请查看文档About Google Cloud Armor security policies

通过使用 Google Cloud Armor 自定义规则语言参考,您 可以创建自定义条件匹配的各种属性 传入流量如网址路径、请求方法或请求 标头值。

Allow or deny traffic for a request URI that matches a regular expression

以下表达式匹配包含字符串的请求 URI 中的 bad_path:

request.path.matches('/bad_path/')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-09-26
    • 2015-03-25
    • 2019-08-27
    • 1970-01-01
    • 2018-01-31
    • 2020-04-17
    • 2017-03-19
    • 1970-01-01
    相关资源
    最近更新 更多