Appengine 服务器的 IP 地址块?

发布于 2024-10-31 00:32:21 字数 302 浏览 7 评论 0原文

我正在与第三方网络服务合作,该服务要求对其服务的所有调用均来自列入白名单的 IP 地址。也就是说,我必须向他们提供 IP 地址,我将从该地址调用他们的服务。

问题是我正在使用 Google Appengine。从 Appengine 发出传出 http 请求时,有什么方法可以获取静态 IP 地址吗?如果失败 - 是否存在所有请求都来自的 IP 地址块?我可以将整个集团列入白名单。如果这种情况存在,改变的可能性有多大?

我知道我可以设置一个简单的 Amazon EC2 实例来用作代理(将询问另一个问题来具体了解如何执行此操作),但只是想确保没有其他方法。

I'm working with a third party webservice who requires that all calls to their service are made from whitelisted IP addresses. That is, I must give them IP addresses from which I will be making calls to their service.

Problem is I'm using Google Appengine. Is there any way to get a static IP address when making outgoing http requests from Appengine? Failing that - is there a block of IP addresses that all requests will come from? I could get the entire bloc whitelisted. If this exists, how likely is it to change?

I know I could setup a simple Amazon EC2 instance to use as a proxy (will ask another question for how to do this specifically) but just wanted to make sure there was no other way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

眼趣 2024-11-07 00:32:21

几周前,我在通过 Urlfetch 从 Google App Engine 连接到 Stack Exchange API 时遇到了同样的问题(团队已及时修复将所有 GAE IP 列入白名单的问题)。

urlfetch 连接可能来自的 IP 地址范围可以通过执行以下 DNS 查找来找到:

dig -t TXT _netblocks.google.com @ns1.google.com 

I had the same problem a couple of weeks ago connecting via Urlfetch from Google App Engine to the Stack Exchange API (The team has promptly fixed the problem whitelisting all the GAE IPs).

The range of IP addresses that urlfetch connections may come from, can be found by performing the following DNS lookup:

dig -t TXT _netblocks.google.com @ns1.google.com 
掌心的温暖 2024-11-07 00:32:21

最后我检查了一下这是不可能的。您可以动态获取当前的 IP 地址,但它是不可预测的。

Last I checked this wasn't possible. You can get the current IP address dynamically, but it isn't predictable.

单身情人 2024-11-07 00:32:21

请注意:_netblocks.google.com 显然不准确。目前我注意到 GAE 从您挖掘 _netblocks 时未列出的地址进行连接,例如来自 8.35.201.166。

此范围未在 _netblocks、_netblocks2 或 _netblocks3 中列出。

当前挖掘输出:
IP4:216.239.32.0/19
IP4:64.233.160.0/19
IP4:66.249.80.0/20
IP4:72.14.192.0/18
IP4:209.85.128.0/17
IP4:66.102.0.0/20
IP4:74.125.0.0/16
IP4:64.18.0.0/20
IP4:207.126.144.0/20
IP4:173.194.0.0/16

Please note: _netblocks.google.com is apparently not accurate. Currently I have noticed that GAE connects from addresses not listed when you dig _netblocks, for example from 8.35.201.166.

This range is not listed in _netblocks, _netblocks2 or _netblocks3.

Current dig output:
ip4:216.239.32.0/19
ip4:64.233.160.0/19
ip4:66.249.80.0/20
ip4:72.14.192.0/18
ip4:209.85.128.0/17
ip4:66.102.0.0/20
ip4:74.125.0.0/16
ip4:64.18.0.0/20
ip4:207.126.144.0/20
ip4:173.194.0.0/16

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文