# IP Address Ranges

Exoscale publishes its current IP address ranges or prefixes in JSON format. This file is officially
maintained and updated whenever we launch a new zone or introduce a new service.

We publish these IP address ranges so users can use the IP ranges and definitions in their configuration to
improve security, or optimize traffic paths if applicable.

## Accessing the resource

The file is published on the Exoscale SOS as
[exoscale-prefixes.json](https://exoscale-prefixes.sos-ch-dk-2.exo.io/exoscale_prefixes.json)

It contains both public IPv4 and IPv6 ranges currently in use by Exoscale.

## File syntax

The Exoscale prefixes file for the IP ranges is structured as follows:

```bash
{
  "creationTime": "2021-11-08T15:07:09.760100+00:00",
  "prefixes": [
    {
      "IPv4Prefix": "89.145.160.0/22",
      "zone": "de-fra-1"
    },
    ...
```

* creationTime: indicates when the file was generated. The file is always overwritten. If you need
    to access a previous version, save successive versions of the .json file on your system.
* Prefixes: contains the array of either IPv4 or IPv6 ranges in use.
* IPv4Prefix or IPv6Prefix: CIDR notation of IP ranges
* zone: technical name of the Exoscale zone the prefix is associated to. The list of
    datacenter zones can be obtained from our [website](https://www.exoscale.com/datacenters/)
    or via the `exo` command-line like below

```bash
exo zone
```

Output:

```bash
┼──────────┼
│   NAME   │
┼──────────┼
│ at-vie-1 │
│ at-vie-2 │
│ bg-sof-1 │
│ ch-dk-2  │
│ ch-gva-2 │
│ de-fra-1 │
│ de-muc-1 │
┼──────────┼
```

## Additional information

The prefixes can be consumed and used as sources in various
configuration elements, and the [jq](https://stedolan.github.io/jq/)
is a handy processor to manage JSON data from the command line.

The information is also available as the RFC 8805 format from the IETF. See the [geofeed](https://exoscale-prefixes.sos-ch-dk-2.exo.io/exoscale_geofeed).
