3

我正在使用 DialogFlow 构建 Google Home 应用程序。实现是通过指向我的虚拟机的 Webhook 完成的。
在 VM 中,443 端口是开放的,并且证书已配置。
但是现在我想更改虚拟机防火墙以仅允许谷歌服务器 IP 地址/子网
有谁知道在哪里可以找到这个列表?
我在以下位置找到了 Alexa 的等效列表:http: //docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html
(ip-ranges.json 文件)
在此先感谢
Ester

4

3 回答 3

3

归功于我发现的这个 reddit 旧帖子:https ://www.reddit.com/r/starcitizen/comments/3lce2k/list_of_google_cloud_ip_addresses_for_firewall/

使用此命令,您可以获得谷歌 IP 列表并相应地更新防火墙

dig @8.8.8.8 +short txt _cloud-netblocks.googleusercontent.com | sed 's/"//g; s/ip4://g; s/ip6://g;' | tr ' ' '\n' | grep include | cut -d ':' -f2 | xargs dig @8.8.8.8 +short txt | sed 's/"//g; s/ip4://g; s/ip6://g;' | tr ' ' '\n' | grep '/' 
于 2019-07-12T11:57:11.717 回答
3

对于 2020 年来到这里的任何人,Google 都会在文档中公布他们的 IP 地址。

  • Google 在goog.json中发布了它向互联网宣布的 IP 范围的完整列表。
  • Google 还在cloud.json中发布了 Google Cloud 客户可用的全球和区域外部 IP 地址范围列表。Google API 和服务的默认域使用的 IP 地址适合通过从 goog.json 中删除 cloud.json 中的所有范围来计算的范围列表

参考:https ://cloud.google.com/vpc/docs/configure-private-google-access#ip-addr-defaults

于 2020-11-19T14:44:33.300 回答
-1

这不是谷歌主页的问题。阅读有关防火墙白名单功能的文档。

于 2019-07-09T21:40:27.887 回答