【问题标题】:What is the IP range(s) of Google pub/sub?Google pub/sub 的 IP 范围是多少?
【发布时间】:2018-12-12 19:20:49
【问题描述】:

我有一个 Google 发布/订阅订阅,它将主题的消息推送到 AppEngine 标准服务端点。

我想将 AppEngine 标准服务的访问权限限制为用户 IP,并且仍然允许来自 Google Pub/sub 的消息。

在 AppEngine 防火墙中,唯一的选择是允许某些 IP 范围。

Google pub/sub 的 IP 范围是多少?

【问题讨论】:

标签: google-app-engine firewall google-cloud-pubsub


【解决方案1】:

我注意到来自 Pub/Sub 推送订阅的所有 IP 请求都来自 2002:axx:xxxx::。根据 IETF RFC 30562002::: 是一个 6to4 范围。然后,2002:axx:xxxx:: 被转换为 10.XXX.XXX.XXX,这是 Google 在本例中为内部网络保留的范围。

注意:除 Pub/Sub 之外的其他服务可能 [在某些时候] 使用范围 2002:a00::/2410.XXX.XXX.XXX。例如App Engine Flexible。如果来自 Flexible 的请求在这个特定项目中无法描述,那么您将阻止它并给予它更高的优先级。

最后你的防火墙条目:

10      Allow   2002:a00::/24   Pub/Sub 
default Deny    *               The default action.

此外,在 Google 的问题跟踪器中创建了一个 issue

【讨论】:

    猜你喜欢
    • 2020-04-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-13
    • 1970-01-01
    • 2015-09-06
    • 2017-09-28
    • 1970-01-01
    相关资源
    最近更新 更多