了解 IoT 中心的 IP 地址Understanding the IP address of your IoT hub

IoT 中心的 IP 地址是中心的负载均衡的公共终结点,不是专用 IP 地址。The IP address of your IoT hub is a load-balanced public endpoint for your hub and NOT a dedicated IP address. 此地址取决于它部署时所在的 Azure 区域的网络地址范围。The address is determined by the network address range of the Azure region where it is deployed. 此 IP 地址可能会在没有通知的情况下更改。This IP address is subject to change without notice. 数据中心网络更新、数据中心灾难恢复或 IoT 中心的区域故障转移可能会更改 IoT 中心 IP 地址。Datacenter network updates, datacenter disaster recovery, or regional failover of an IoT hub can change your IoT hub IP address. 请参阅 IoT 中心高可用性和灾难恢复,以便更详细地了解 Azure IoT 中心区域故障转移和可用性。See IoT Hub high availability and disaster recovery for more detail on Azure IoT Hub regional failover and availability.

在故障转移到另一区域以后,IoT 中心的 IP 地址会更改。The IP address of your IoT hub changes after a failover to another region. 可以按对 IoT 中心执行手动故障转移教程中的说明测试此功能。You can test this functionality by following the tutorial Perform a manual failover of an IoT hub.

发现 IoT 中心 IP 地址Discover your IoT hub IP address

在 CNAME ([iot-hub-name].azure-devices.cn) 上使用反向 DNS 查找即可发现 IoT 中心的 IP 地址。Your IoT Hub IP address can be discovered by using a reverse DNS lookup on the CNAME ([iot-hub-name].azure-devices.cn). 可以使用 nslookup 验证 IoT 中心实例的 IP 地址:You can use nslookup to verify the IP address of an IoT hub instance:

nslookup {YourIoTHubName}.azure-devices.cn

此 IP 地址可能会在没有通知的情况下更改。This IP address can change without notice. 在进行故障转移或灾难恢复的情况下,必须在次要区域轮询 IoT 中心 IP 地址。In a failover or disaster recovery scenario, you'll have to poll your IoT hub IP address in the secondary region.

IoT 中心的出站防火墙规则Outbound firewall rules for IoT hub

尝试创建防火墙规则,根据 IoT 中心的主机名或域进行筛选。Try to create firewall rules and filtering based on the IoT hub host name or domain. 如果只能允许出站流量发往特定地址,则请定期轮询 IoT 中心 IP 地址并更新防火墙规则。If you can only allow outbound traffic to specific addresses, poll your IoT hub IP address regularly and update your firewall rules.

对 IPv6 的支持Support for IPv6

目前 IoT 中心不支持 IPv6。IPv6 is currently not supported on IoT Hub.