在调用API时,为了防止资源组不能正常访问数据源,您需要在数据源中配置IP白名单,从而确保资源组的网络连通性。本文为您介绍不同资源组类型对应的IP白名单或其获取方式,以及在数据源中配置IP白名单时的注意事项。
获取白名单IP地址:公共资源组
创建数据服务API前,您需要提前配置好数据源。为确保数据服务成功连通数据源,请在数据库中添加下表中对应地域的白名单。
随着公共资源组的底层扩容等操作,白名单的IP网段可能会动态变化。若白名单更新,DataWorks将提前进行通知。若您的业务场景比较顾虑白名单变更,建议您使用独享资源组。
地域 | 白名单 |
华东1(杭州) | 100.64.0.0/10,11.193.102.0/24,11.193.215.0/24,11.194.110.0/24,11.194.73.0/24,118.31.157.0/24,47.97.53.0/24,11.196.23.0/24,47.99.12.0/24,47.99.13.0/24,114.55.197.0/24,11.197.246.0/24,11.197.247.0/24,118.31.243.0/26,118.31.243.64/26,118.31.243.128/26,118.31.243.192/26,11.193.55.0/24,101.37.74.122,114.55.197.231,114.55.198.83,101.37.74.206 |
华东2(上海) | 11.193.109.0/24,11.193.252.0/24,47.101.107.0/24,47.100.129.0/24,106.15.14.0/24,10.117.28.203,10.143.32.0/24,10.152.69.0/24,10.153.136.0/24,10.27.63.15,10.27.63.38,10.27.63.41,10.27.63.60,10.46.64.81,10.46.67.156,11.192.97.0/24,11.192.98.0/24,11.193.102.0/24,11.218.89.0/24,11.218.96.0/24,11.219.217.0/24,11.219.218.0/24,11.219.219.0/24,11.219.233.0/24,11.219.234.0/24,118.178.142.154,118.178.56.228,118.178.59.233,118.178.84.74,120.27.160.26,120.27.160.81,121.43.110.160,121.43.112.137,100.64.0.0/10,10.117.39.238,11.193.96.0/24,11.193.48.0/24,11.193.108.0/24,101.132.31.146,106.15.14.240,106.15.14.75,101.132.31.221 |
华南1(深圳) | 100.106.46.0/24,100.106.49.0/24,10.152.27.0/24,10.152.28.0/24,11.192.91.0/24,11.192.96.0/24,11.193.103.0/24,100.64.0.0/10,120.76.104.0/24,120.76.91.0/24,120.78.45.0/24,47.106.63.0/26,47.106.63.128/26,47.106.63.192/26,47.106.63.64/26,11.193.94.0/24,120.78.45.154,120.78.46.137,120.78.46.107,120.78.45.140,172.26.131.130,172.26.131.129,172.26.131.128,172.26.131.127,101.133.0.0/16,101.200.0.0/16,101.226.0.0/16,110.75.0.0/16,111.13.0.0/16,111.206.0.0/16,112.126.0.0/16,114.250.0.0/16,114.66.0.0/16,116.128.0.0/16,117.185.0.0/16,118.31.0.0/16,120.77.0.0/16,121.89.0.0/16,123.6.0.0/16,182.92.0.0/16,210.51.0.0/16,221.228.0.0/16,223.4.0.0/16,223.5.0.0/16,36.150.0.0/16,39.101.0.0/16,39.104.0.0/16,39.107.0.0/16,39.156.0.0/16,39.97.0.0/16,39.98.0.0/16,39.99.0.0/16,47.92.0.0/16,47.96.0.0/11,49.7.0.0/16,8.129.0.0/16,8.132.0.0/16,8.134.0.0/16,8.137.0.0/16,8.141.0.0/16,8.143.0.0/16,8.145.0.0/16,8.146.0.0/16,8.139.99.192/26,8.139.112.0/26,8.139.112.64/26,8.139.112.128/26,47.121.73.192/26,47.121.96.128/26,47.121.96.192/26,47.121.97.0/26,8.139.234.64/26,8.139.234.128/26,8.139.234.192/26,8.139.235.0/26,47.109.170.64/26,47.109.170.128/26,47.109.170.0/26,47.108.33.192/26,47.108.33.0/26,47.108.32.192/26,47.108.32.128/26,47.108.32.0/26,8.149.144.64/26,8.149.144.192/26,8.149.144.128/26,8.149.144.0/26,10.245.165.0/24 |
西南1(成都) | 11.195.52.0/24,11.195.55.0/24,47.108.22.0/24,100.64.0.0/10 |
华北2(北京) | 100.106.48.0/24,10.152.167.0/24,10.152.168.0/24,11.193.50.0/24,11.193.75.0/24,11.193.82.0/24,11.193.99.0/24,100.64.0.0/10,47.93.110.0/24,47.94.185.0/24,47.95.63.0/24,11.197.231.0/24,11.195.172.0/24,47.94.49.0/24,182.92.144.0/24,11.193.100.0/24,11.193.199.0/24,39.106.244.50,47.95.63.101,47.95.63.93,39.106.244.48,172.22.1.42,172.22.2.208,172.22.1.41,172.22.2.207 |
华北3(张家口) | 11.193.235.0/24,47.92.22.0/24,100.64.0.0/10,11.112.227.0/24 |
中国香港 | 10.152.162.0/24,11.192.196.0/24,11.193.11.0/24,100.64.0.0/10,47.89.61.0/24,47.91.171.0/24,11.193.118.0/24,47.75.228.0/24,47.56.45.0/25,47.244.92.128/25,47.101.109.0/24,11.193.200.0/24,11.193.12.0/24,47.90.71.152,47.90.71.141,47.91.171.178,47.91.172.3 |
新加坡 | 100.106.10.0/24,100.106.35.0/24,10.151.234.0/24,10.151.238.0/24,10.152.248.0/24,11.192.153.0/24,11.192.40.0/24,11.193.8.0/24,100.64.0.0/10,47.88.147.0/24,47.88.235.0/24,11.193.162.0/24,11.193.163.0/24,11.193.220.0/24,11.193.158.0/24,47.74.162.0/24,47.74.203.0/24,47.74.161.0/24,11.197.188.0/24,11.197.227.0/24,47.74.161.218,47.74.161.181,161.117.140.83,47.88.143.36 |
美国(硅谷) | 10.152.160.0/24,100.64.0.0/10,47.89.224.0/24,11.193.216.0/24,47.88.108.0/24,47.88.99.153,47.254.58.215,47.88.108.192,47.254.58.135 |
美国(弗吉尼亚) | 11.193.203.0/24,11.194.68.0/24,11.194.69.0/24,100.64.0.0/10,47.252.55.0/24,47.252.88.0/24,11.194.69.0/24,10.128.135.0/24,47.88.98.0/24 |
马来西亚(吉隆坡) | 11.193.188.0/24,11.221.205.0/24,11.221.206.0/24,11.221.207.0/24,100.64.0.0/10,11.214.81.0/24,47.254.212.0/24,11.193.189.0/24,47.250.29.0/26,47.250.29.128/26,47.250.29.192/26,47.250.29.64/26 |
德国(法兰克福) | 11.192.116.0/24,11.192.168.0/24,11.192.169.0/24,11.192.170.0/24,11.193.106.0/24,100.64.0.0/10,11.192.116.14,11.192.116.142,11.192.116.160,11.192.116.75,11.192.170.27,47.91.82.22,47.91.83.74,47.91.83.93,47.91.84.11,47.91.84.110,47.91.84.82,11.193.167.0/24,47.254.138.0/24,11.194.61.0/24,47.254.185.0/24 |
日本(东京) | 100.105.55.0/24,11.192.147.0/24,11.192.148.0/24,11.192.149.0/24,100.64.0.0/10,47.91.12.0/24,47.91.13.0/24,47.91.9.0/24,11.199.250.0/24,47.91.27.0/24,11.59.59.0/24,47.245.51.128/26,47.245.51.192/26,47.91.0.128/26,47.91.0.192/26 |
英国(伦敦) | 11.199.93.0/24,100.64.0.0/10,8.208.72.0/26,8.208.72.128/26,8.208.72.192/26,8.208.72.64/26 |
印度尼西亚(雅加达) | 11.194.49.0/24,11.200.93.0/24,11.200.95.0/24,11.200.97.0/24,100.64.0.0/10,149.129.228.0/24,10.143.32.0/24,11.194.50.0/24,11.59.135.0/24,147.139.156.0/26,147.139.156.128/26,147.139.156.64/26,149.129.230.192/26,149.129.229.0/26,149.129.229.64/26,149.129.229.128/26,149.129.229.192/26 |
华北2(政务云) | 11.194.116.0/24,100.64.0.0/10,39.107.188.202,11.194.121.0/24,39.107.223.0/26,39.107.223.128/26,39.107.223.192/26,39.107.223.64/26 如果IP地址段添加不成功,请添加下述IP地址: 11.194.116.160,11.194.116.161,11.194.116.162,11.194.116.163,11.194.116.164,11.194.116.165,11.194.116.167,11.194.116.169,11.194.116.170,11.194.116.171,11.194.116.172,11.194.116.173,11.194.116.174,11.194.116.175,39.107.188.0/24,11.194.121.51,11.194.121.50,39.107.223.0/26,39.107.223.128/26,39.107.223.192/26,39.107.223.64/26 |
华东2(上海)金融云 | 140.205.46.128/25,140.205.48.0/25,140.205.48.128/25,140.205.49.0/25,140.205.49.128/25,11.192.156.0/25,11.192.157.0/25,11.192.164.0/25,11.192.165.0/25,11.192.166.0/25,11.192.167.0/25,106.11.245.0/26,106.11.245.128/26,106.11.245.192/26,106.11.245.64/26,140.205.39.0/24,106.11.225.0/24,106.11.226.0/24,106.11.227.0/24,106.11.242.0/24,100.104.8.0/24,11.192.167.0/24,47.102.181.0/24, 47.102.234.0/24 |
获取白名单IP地址:独享数据服务资源组
独享数据服务资源组支持访问公网环境、阿里云VPC网络环境、IDC网络环境下的数据源。下表将为您介绍不同网络环境下如何进行网络配置,以确保独享数据服务资源组与不同网络环境数据源之间的连通性。
独享服务资源组的使用,请参见:新增和使用独享数据服务资源组。
数据源所在网络环境 | 网络连通方案 | 网络连通配置操作指导 |
数据源具备访问公网的能力 | 独享数据服务资源组可以连通。 |
|
数据源在经典网络内 | 独享数据服务资源组不支持网络连通,如需连通请使用公共数据服务资源组。 | 无。 |
数据源在VPC内 - 数据源和DataWorks在同一个地域、同一个VPC、同一个V-Switch中 | 独享服务资源组可以连通。 |
|
数据源在VPC内 - 数据源和DataWorks在同一个地域、同一个VPC,不同V-Switch中 | 独享数据服务资源组可以连通。 | |
数据源在VPC内 - 数据源和DataWorks在同一个地域、不同VPC中 | 独享数据服务资源组可以连通。 |
|
数据源在VPC内 - 数据源和DataWorks在不同地域中 | 独享数据服务资源组可连通。 |
|
数据源在IDC内 | 独享数据服务资源组可以连通。 |
|
配置数据源白名单
为避免因为数据源设置了白名单控制,导致DataWorks数据服务与数据源之间,您需要根据使用的资源组情况,将上述资源组对应的IP地址添加到数据源的白名单中。而配置数据源白名单时,不同数据源的白名单配置的注意事项不同。
以阿里云云数据库RDS为例,产品支持通用模式IP白名单和高安全模式IP白名单两种白名单配置方式,添加白名单时配置的白名单分组可能会影响数据服务与数据库的网络连通。
如果RDS为通用模式IP白名单模式:
通用模式IP白名单不区分经典网络和专有网络白名单分组。
公共数据服务资源组、独享数据服务资源组可以使用同样的白名单分组配置。
说明在通用白名单模式下,设置的IP地址,既可通过经典网络,也可通过专有网络访问RDS实例。
如果RDS为高安全模式IP白名单模式:
高安全模式区分经典网络和专有网络白名单分组。
说明在高安全模式下,白名单分组需指定网络隔离模式,例如设置在经典网络的白名单IP地址,不可从专有网络访问RDS实例,反之亦然。
独享数据服务资源组使用VPC内网直接连接数据库时,白名单分组需选择使用专有网络白名单分组。
公共数据服务资源组访问VPC网络数据源(例如,实例模式配置的专有网络 RDS MySQL)时,白名单分组需选择使用专有网络白名单分组。
数据服务资源组使用公网连接地址、经典网络连接地址直接访问数据库时,白名单分组需选择使用经典网络白名单分组。
如果您在数据库将白名单模式从通用模式IP白名单模式切换为高安全模式IP白名单模式:
RDS会将通用模式IP白名单复制分为2份,分别放到经典网络和专有网络白名单分组类型里面。
其他白名单配置注意事项:
设置白名单不会影响RDS实例的正常运行。
默认的IP白名单分组(default )不能删除,只能清空。
请勿修改或删除系统自动生成的分组,避免影响相关产品的使用。例如ali_dms_group(DMS产品IP地址白名单分组)、hdm_security_ips(DAS产品IP地址白名单分组)。
说明建议您在数据库配置白名单时,单独为DataWorks白名单新建一个白名单分组。
默认的IP白名单只包含127.0.0.1,表示任何IP均无法访问该RDS实例。
RDS白名单配置详情可参见通过客户端、命令行连接RDS MySQL实例。其他类型的数据源类似,可参考各数据源数据库的白名单配置步骤,分别添加对应的白名单。