You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -20,7 +20,7 @@ Use IP filter to receive traffic only from a specified range of IP addresses and
20
20
21
21
## Default setting
22
22
23
-
To get to the IP Filter settings page of your IoT hub, select **Networking** > **Public access**, then choose **Selected IP Ranges**:
23
+
To get to the IP Filter settings page of your IoT hub, select **Security settings** > **Networking** > **Public access**, then choose **Selected IP Ranges**:
24
24
25
25
:::image type="content" source="media/iot-hub-ip-filtering/ip-filter-default.png" alt-text="Screenshot showing how to set default IP filter settings.":::
26
26
@@ -32,7 +32,7 @@ To add an IP filter rule, select **Add IP Filter Rule**. To quickly add your com
32
32
33
33
:::image type="content" source="./media/iot-hub-ip-filtering/ip-filter-add-rule.png" alt-text="Screenshot showing how to add an IP filter rule to an IoT hub.":::
34
34
35
-
After selecting **Add IP Filter Rule**, fill in the fields. These fields are pre-filled for you if you selected to add your client IP address.
35
+
After selecting **Add IP Filter Rule**, fill in the fields. These fields are prefilled for you if you selected to add your client IP address.
36
36
37
37
:::image type="content" source="./media/iot-hub-ip-filtering/ip-filter-after-selecting-add.png" alt-text="Screenshot that shows what to do after adding an IP filter rule.":::
38
38
@@ -42,15 +42,13 @@ After selecting **Add IP Filter Rule**, fill in the fields. These fields are pre
42
42
43
43
After filling in the fields, select **Save** to save the rule. You see an alert notifying you that the update is in progress.
44
44
45
-
:::image type="content" source="./media/iot-hub-ip-filtering/ip-filter-save-new-rule.png" alt-text="Screenshot that shows notification about saving an IP filter rule.":::
46
-
47
45
The **Add** option is disabled when you reach the maximum of 100 IP filter rules.
48
46
49
47
To edit an existing rule, select the data you want to change, make the change, then select **Save** to save your edit.
50
48
51
49
## Delete an IP filter rule
52
50
53
-
To delete an IP filter rule, select the trash can icon on that row and then select **Save**. The rule is removed and the change is saved.
51
+
To delete an IP filter rule, select the trash can icon on that row, and then select **Save**. The rule is removed and the change is saved.
54
52
55
53
:::image type="content" source="./media/iot-hub-ip-filtering/ip-filter-delete-rule.png" alt-text="Screenshot showing how to delete an IoT Hub IP filter rule.":::
56
54
@@ -65,38 +63,38 @@ To apply the IP filter rules to the built-in Event Hubs compatible endpoint, che
65
63
66
64
By enabling this option, your IP filter rules are replicated to the built-in endpoint, so only trusted IP ranges can access it.
67
65
68
-
If you disable this option, the built-in endpoint is accessible to all IP addresses. This behavior may be useful if you want to read from the endpoint with services with source IP addresses which may change over time like Azure Stream Analytics.
66
+
If you disable this option, the built-in endpoint is accessible to all IP addresses. This behavior can be useful if you want to read from the endpoint with services with source IP addresses which might change over time like Azure Stream Analytics.
69
67
70
68
## How filter rules are applied
71
69
72
70
The IP filter rules are applied at the IoT Hub service level. Therefore, the IP filter rules apply to all connections from devices and back-end apps using any supported protocol. Also, you can choose if the [built-in Event Hubs compatible endpoint](iot-hub-devguide-messages-read-builtin.md) (not via the IoT Hub connection string) are bound to these rules.
73
71
74
-
Any connection attempt from an IP address that isn't explicitly allowed receives an unauthorized 401 status code and description. The response message does not mention the IP rule. Rejecting IP addresses can prevent other Azure services such as Azure Stream Analytics, Azure Virtual Machines, or the Device Explorer in Azure portal from interacting with the IoT hub.
72
+
Any connection attempt from an IP address that isn't explicitly allowed receives an unauthorized 401 status code and description. The response message doesn't mention the IP rule. Rejecting IP addresses can prevent other Azure services such as Azure Stream Analytics, Azure Virtual Machines, or the Device Explorer in Azure portal from interacting with the IoT hub.
75
73
76
74
> [!NOTE]
77
75
> If you want to use Azure Stream Analytics (ASA) to read messages from an IoT hub with IP filter enabled, **disable** the **Apply IP filters to the built-in endpoint** option, and then use the event hub-compatible name and endpoint of your IoT hub to manually add an [Event Hubs stream input](../stream-analytics/stream-analytics-define-inputs.md#stream-data-from-event-hubs) in the ASA.
78
76
79
-
### Ordering
77
+
### Azure portal
80
78
81
-
IP filter rules are *allow* rules and applied without ordering. Only IP addresses that you add are allowed to connect to IoT Hub.
79
+
IP filter rules are also applied when using IoT Hub through Azure portal. This is because API calls to the IoT Hub service are made directly using your browser with your credentials, which is consistent with other Azure services. To access IoT Hub using Azure portal when IP filter is enabled, add your computer's IP address to the allowlist.
82
80
83
-
For example, if you want to accept addresses in the range `192.168.100.0/22` and reject everything else, you only need to add one rule in the grid with address range `192.168.100.0/22`.
81
+
### Ordering
84
82
85
-
### Azure portal
83
+
IP filter rules are *allow* rules and are applied without ordering. Only IP addresses that you add are allowed to connect to IoT Hub.
86
84
87
-
IP filter rules are also applied when using IoT Hub through Azure portal. This is because API calls to the IoT Hub service are made directly using your browser with your credentials, which is consistent with other Azure services. To access IoT Hub using Azure portal when IP filter is enabled, add your computer's IP address to the allowlist.
85
+
For example, if you want to accept addresses in the range `192.168.100.0/22` and reject everything else, you only need to add one rule in the grid with address range `192.168.100.0/22`.
88
86
89
87
## Retrieve and update IP filters using Azure CLI
90
88
91
-
Your IoT Hub's IP filters can be retrieved and updated through [Azure CLI](/cli/azure/).
89
+
Your IoT hub's IP filters can be retrieved and updated through [Azure CLI](/cli/azure/).
92
90
93
91
To retrieve current IP filters of your IoT Hub, run:
94
92
95
93
```azurecli-interactive
96
94
az resource show -n <iothubName> -g <resourceGroupName> --resource-type Microsoft.Devices/IotHubs
97
95
```
98
96
99
-
This will return a JSON object where your existing IP filters are listed under the `properties.networkRuleSets` key:
97
+
This returns a JSON object where your existing IP filters are listed under the `properties.networkRuleSets` key:
100
98
101
99
```json
102
100
{
@@ -133,7 +131,7 @@ To remove an existing IP filter in your IoT Hub, run:
You may also retrieve and modify your IoT Hub's IP filter using Azure resource Provider's REST endpoint. See `properties.networkRuleSets` in [createorupdate method](/rest/api/iothub/iothubresource/createorupdate).
164
+
You can also retrieve and modify your IoT Hub's IP filter using Azure resource Provider's REST endpoint. See `properties.networkRuleSets` in [createorupdate method](/rest/api/iothub/iothubresource/createorupdate).
0 commit comments