Check if an IP address is part of an Azure Service Tag

Cloud IP Checker

This service will help you determine whether an IP address is within one of the Azure Service Tag network ranges.

If it is found, it will provide you with the Azure Region and Azure Service that the IP address belongs to.

This tool can be consumed in three different ways.

  • API
  • Web Frontend
  • CLI tool

API

Using the API

The API is ready for you to use and is hosted in Azure. It takes an ip address as a query parameter of ip. This can be either IPv4 or IPv6.

An example URI is: https://cloudipchecker.azurewebsites.net/api/servicetags/manual?ip=13.86.98.0

By default the API searches the downloaded JSON file that is available on the Azure Website to manually download.

If you wish to query to Azure Service Tag API instead, then you will need to change the URI, replacing manual with api

An example URI for this is: https://cloudipchecker.azurewebsites.net/api/servicetags/api?ip=13.86.98.0

The reason for this is that as the Service Tag API is in preview, it does not include as much data as the JSON that you can manually download. So you may get inconsistent or unexpected results there. Therefore, I built support for both. As the Service Tag API goes GA, I will change the default to be the API instead.

An example output of the API is as per below.

Sometimes you will receive both Region and Service but other times you will receive neither.

{
    "Status": 200,
    "Values": [
        {
            "Region": "",
            "Service": "ApplicationInsightsAvailability",
            "AddressPrefix": "13.86.98.0/27"
        },
        {
            "Region": "centralus",
            "Service": "",
            "AddressPrefix": "13.86.0.0/17"
        },
        {
            "Region": "",
            "Service": "",
            "AddressPrefix": "13.86.0.0/17"
        }
    ]
}

Deploying your own version of the API

The API code can be found in the /backend directory in this repository. It is designed to work with and be deployed to Azure Functions and Custom Handlers.

You will need to set an Application Setting of SUBSCRIPTION_ID and give this your Azure subscription ID as a value.

Then it should be as simple as deploying to Azure. I recommend using the Azure Functions Extension for VSCode to do this.

Once deployed to Azure, you need to assign a Managed Identity to your Azure Functions with permissions to access to VNET Service Tag API.

Running Locally

If you wish to test this locally, you will need to either:

  1. Create a Service Principal and add it to your local environment. This will require no changes to the code and is the preferred method.
  2. Edit the backend/apiservicetags/apiservicetags.go file and change the Auth function to use the CLI. You will need the Azure CLI installed and authenticated for this. You can see the lines reference here with the CLI auth commented out. You will need to change this back when you deploy to Azure as your function in the cloud will not have the CLI auth. It will use the environment.

You can then leverage the Azure functions local tooling by using func start

Web Frontend

If you just want to simply check an IP address ad hoc, you can use the web frontend. It can be found, hosted online and ready to use here.

Using the Web Frontend

This tool is pretty self explanatory.

  • Enter the IP Address you which to search for
  • Select whether you wish to search the Web JSON or API data
  • Click Submit and the results will be displayed to you

CLI

If you wish to use this tool as part of your build process or in another automated way, it may be best to have a simple CLI utility that you can use to search for IP addresses. Such as:

▶ cloudipchecker get --ip 13.72.105.31
Performing ip lookup for: 13.72.105.31 using data source: webjson
{
    "Status": 200,
    "Values": [
        {
            "Region": "",
            "Service": "AzureAdvancedThreatProtection",
            "AddressPrefix": "13.72.105.31/32"
        },
        {
            "Region": "eastus",
            "Service": "",
            "AddressPrefix": "13.72.64.0/18"
        },
        {
            "Region": "",
            "Service": "",
            "AddressPrefix": "13.72.64.0/18"
        }
    ]
}

The CLI Utility has it's own repository - Cloud IP Checker CLI.

You will find installation and usage details there.

TODO

Some ideas for future enhancements

  • Add support for domain names as well as ip addresses
  • Add a --service option to search for an Azure service and retrieve the associated prefixes
  • Add a --region option to search for an Azure region and retrieve the associated prefixes

Credits

Created with ❤️ by Dean Bryen
💡 Inspiration from Adam Stuart and James Complin

Similar Resources

EaseMesh is a service mesh that is compatible with the Spring Cloud ecosystem.

EaseMesh is a service mesh that is compatible with the Spring Cloud ecosystem.

A service mesh implementation for connecting, control, and observe services in spring-cloud.

Jan 4, 2023

Access to b2c microservices through this service

Access to b2c microservices through this service

API service Access to b2c microservices through this service Config file Create config file with services addresses. Services: vdc - get camera inform

Nov 8, 2021

This is a template service for development first with go monolithic architecture

This is a template service for development first with go monolithic architecture

Nov 27, 2022

A Go implementation of twtxt - decentralised, minimalist microblogging service for hackers

GoTwtxt A Go implementation of twtxt - decentralised, minimalist microblogging service for hackers Usage: Send a tweet: # pass the message on the cli

Nov 9, 2022

A Go implementation of twtxt - decentralised, minimalist microblogging service for hackers

GoTwtxt A Go implementation of twtxt - decentralised, minimalist microblogging service for hackers Usage: Send a tweet: # pass the message on the cli

Nov 5, 2021

The Consul API Gateway is a dedicated ingress solution for intelligently routing traffic to applications running on a Consul Service Mesh.

The Consul API Gateway is a dedicated ingress solution for intelligently routing traffic to applications running on a Consul Service Mesh.

Dec 14, 2022

Meshery, the service mesh management plane

Meshery, the service mesh management plane

Meshery is the multi-service mesh management plane offering lifecycle, configuration, and performance management of service meshes and their workloads.

Jan 5, 2023

A microservices-demo service that provides catalogue/product information.

A microservices-demo service that provides catalogue/product information. This service is built, tested and released by travis.

Nov 22, 2021

A microservices-demo service that provides catalogue/product information.

A microservices-demo service that provides catalogue/product information. This service is built, tested and released by travis.

Nov 28, 2021
Comments
  • AddWebTrends-2021-07

    AddWebTrends-2021-07

    We've updated the Readme!

    What is this?

    To best understand which topics are popular and which subjects are trending in our developer communities, we can leverage Web Trends.

    This PR was generated by an automated open-source tool that double checks each Readme to ensure each repository is leveraging Web Trends.

    Web Trends does not collect any Personally Identifiable Information and cannot be traced back to any individual user.

    How do I opt-out from the tool?

    You may opt-out from future PRs here: https://optout-githubreadmelinks.azurewebsites.net

  • AddWebTrends-2021-06

    AddWebTrends-2021-06

    We've updated the Readme!

    What is this?

    To best understand which topics are popular and which subjects are trending in our developer communities, we can leverage Web Trends.

    This PR was generated by an automated open-source tool that double checks each Readme to ensure each repository is leveraging Web Trends.

    Web Trends does not collect any Personally Identifiable Information and cannot be traced back to any individual user.

    How do I opt-out from the tool?

    You may opt-out from future PRs here: https://optout-githubreadmelinks.azurewebsites.net

Collection of personal Dapr demos (bindings, state, pub/sub, service-to-service invocation)

Dapr demos Collection of personal Dapr demos. Note, some of these demos require latest version of Dapr, Ingress gateway, Observability components, or

Dec 10, 2022
Micro-service framework in Go
Micro-service framework in Go

Kite Micro-Service Framework Kite is a framework for developing micro-services in Go. Kite is both the name of the framework and the micro-service tha

Jan 9, 2023
NewSQL distributed storage database based on micro service framework
NewSQL distributed storage database based on micro service framework

QLite 是基于微服务的 NewSQL 型数据库系统,与传统的一体化数据库不同,该系统将本该内置的多种数据结构(STL)拆分成多个服务模块,每个模块都是独立的一个节点,每个节点都与其主网关进行连接,从而形成分布式存储结构。

Jun 19, 2022
High Performance Remote Object Service Engine
High Performance Remote Object Service Engine

=============== Hprose is a High Performance Remote Object Service Engine. It is a modern, lightweight, cross-language, cross-platform, object-oriente

Nov 3, 2022
Kubernetes as a Service
Kubernetes as a Service

Go Report Travis CircleCI Azure Test Azure Release License oneinfra oneinfra is a Kubernetes as a Service platform. It empowers you to provide or cons

Dec 28, 2022
🔥 Kubernetes multi-cluster deployment automation service.
🔥  Kubernetes multi-cluster deployment automation service.

Beetle Kubernetes multi-cluster deployment automation service ?? Check out the demo! Application deployment and management should be automated, audita

Dec 11, 2022
Tiny service health dashboard written in Go
Tiny service health dashboard written in Go

GreenWall Status: Done (waiting for feedback) Description GreenWall is a tiny service health dashboard written in Go (with frontend prepared in Bootst

Nov 29, 2022
Automatic Service Mesh and RPC generation for Go micro services, it's a humble alternative to gRPC with Istio.
Automatic Service Mesh and RPC generation for Go micro services, it's a humble alternative to gRPC with Istio.

Mesh RPC MeshRPC provides automatic Service Mesh and RPC generation for Go micro services, it's a humble alternative to gRPC with Istio. In a nutshell

Aug 22, 2022
🦄🌈 YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go.
🦄🌈 YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go.

???? YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go. Support Nacos ,Consoul ,Etcd ,Eureka ,kubernetes.

Jan 4, 2023
Another excellent micro service framework

xservice [WIP] Another excellent micro service framework Features RESTful API (base on echo/v4) gRPC & gRPC gateway service & Swagger document generat

May 28, 2022