amazon-web-services - 云提供商 IP 地址解析

标签 amazon-web-services azure google-cloud-platform cloud digital-ocean

有没有办法确定 IP 地址是否解析为特定云提供商(AWS、Azure、GCP、Digital Ocean)?像这样的事情:

# Returns 'Azure'
whichCloud('256.256.256.256')

最佳答案

虽然您可以根据以下数据编写工具:

  1. 亚马逊 - https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html
  2. GCP - https://cloud.google.com/compute/docs/faq#find_ip_range
  3. azure - https://www.microsoft.com/en-us/download/details.aspx?id=56519

我不直接知道这样的事情。不过,您可以稍微改变一下。例如,我的主机在亚马逊上。我可以执行 whois my.ip.addr.ess 并得到:

$ whois my.ip.is.here

#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/resources/registry/whois/tou/
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/registry/whois/inaccuracy_reporting/
#
# Copyright 1997-2020, American Registry for Internet Numbers, Ltd.
#


NetRange:       52.0.0.0 - 52.31.255.255
CIDR:           52.0.0.0/11
NetName:        AT-88-Z
NetHandle:      NET-52-0-0-0-1
Parent:         NET52 (NET-52-0-0-0-0)
NetType:        Direct Allocation
OriginAS:       
Organization:   Amazon Technologies Inc. (AT-88-Z)
RegDate:        1991-12-19
Updated:        2015-03-20
Ref:            https://rdap.arin.net/registry//ip/52.0.0.0

其他环境应该类似。这并不完全是您想要的,但它可能会让您更接近。

关于amazon-web-services - 云提供商 IP 地址解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63605876/

相关文章:

azure - 从 MICROSOFT-CORP-MSN-AS-BLOCK 重写的 URL

Android Azure 通信聊天 UI 库导入?

javascript - DriveApp.getStorageUsed() 与 DriveApp.getFiles() 返回的文件大小总和不匹配。

linux - Google Cloud SDK - 有没有办法在没有互联网访问的情况下在 Linux 上手动安装 google cloud sdk?

javascript - AWS S3/Javascript回调问题

amazon-web-services - TransactionCanceledException中的神秘TransactionConflict

node.js - NodeJS 脚本出错后,不会再次启动。 AWS Lambda

amazon-web-services - 如何为所有 CloudFormation 嵌套堆栈保留相同的 API 网关 URL?

c# - Visual Studio Publish, “PublishTelemetry” 任务无法加载

mysql - 从本地数据库将数据加载到 Bigquery