繁体   English   中英

云提供商 IP 地址解析

[英]Cloud Provider IP Address Resolution

有没有办法确定 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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM