> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud IP 地址

> 本页介绍 ClickHouse 中 Cloud Endpoints API 的安全特性，详细说明如何通过身份验证和授权机制管理访问，从而保护您的 ClickHouse 部署。

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

<div id="static-ips-api">
  ## 静态 IP API
</div>

如果您需要获取静态 IP 列表，可以使用以下 ClickHouse Cloud API 端点：[`https://api.clickhouse.cloud/static-ips.json`](https://api.clickhouse.cloud/static-ips.json)。该 API 提供 ClickHouse Cloud 服务的端点信息，例如按区域和云划分的入站/出站 IP 以及 S3 端点。

如果您使用的是 MySQL 或 PostgreSQL Engine 之类的集成，可能需要授权 ClickHouse Cloud 访问您的实例。您可以使用此 API 获取公网 IP，并将其配置到 GCP 的 `firewalls` 或 `Authorized networks` 中，或者配置到 Azure、AWS 的 `Security Groups` 中，或您正在使用的任何其他基础设施出站流量管理系统中。

例如，要允许来自托管在 AWS 上、位于 `ap-south-1` 区域的 ClickHouse Cloud 服务的访问，您可以添加该区域的 `egress_ips` 地址：

```bash theme={null}
❯ curl -s https://api.clickhouse.cloud/static-ips.json | jq '.'
{
  "aws": [
    {
      "egress_ips": [
        "3.110.39.68",
        "15.206.7.77",
        "3.6.83.17"
      ],
      "ingress_ips": [
        "15.206.78.111",
        "3.6.185.108",
        "43.204.6.248"
      ],
      "region": "ap-south-1",
      "s3_endpoints": "vpce-0a975c9130d07276d"
    },
...
```

例如，运行在 `us-east-2` 且需要连接到 ClickHouse Cloud 服务的 AWS RDS 实例，应配置以下入站安全组规则：

<Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/1oh4rjwfuHRS2yL2/images/_snippets/aws-rds-mysql.png?fit=max&auto=format&n=1oh4rjwfuHRS2yL2&q=85&s=fdc1f56d5c349c1c1df8bcdedf5ee706" size="lg" alt="AWS 安全组规则" border width="2316" height="568" data-path="images/_snippets/aws-rds-mysql.png" />

对于同样运行在 `us-east-2` 的 ClickHouse Cloud 服务，如果这次连接的是 GCP 中的 MySQL，`Authorized networks` 应如下所示：

<Image img="https://mintcdn.com/private-7c7dfe99-fix-nav-issues/1oh4rjwfuHRS2yL2/images/_snippets/gcp-authorized-network.png?fit=max&auto=format&n=1oh4rjwfuHRS2yL2&q=85&s=835b31918ed1258d7b0e4e3bc825d10d" size="md" alt="GCP Authorized networks" border width="1172" height="1382" data-path="images/_snippets/gcp-authorized-network.png" />
