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
Copy file name to clipboardExpand all lines: articles/event-hubs/event-hubs-ip-filtering.md
+18-30Lines changed: 18 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,44 +15,31 @@ ms.author: spelluru
15
15
16
16
---
17
17
18
-
# Azure Event Hubs - use firewall rules
18
+
# Configure IP firewall rules for an Azure Event Hubs namespace
19
+
By default, Event Hubs namespaces are accessible from internet as long as the request comes with valid authentication and authorization. With IP firewall, you can restrict it further to only a set of IPv4 addresses or IPv4 address ranges in [CIDR (Classless Inter-Domain Routing)](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation.
19
20
20
-
For scenarios in which Azure Event Hubs should be only accessible from certain well-known sites, firewall rules enable you to configure rules for accepting traffic originating from specific IPv4 addresses. For example, these addresses may be those of a corporate NAT gateway.
21
+
This feature is helpful in scenarios in which Azure Event Hubs should be only accessible from certain well-known sites. Firewall rules enable you to configure rules to accept traffic originating from specific IPv4 addresses. For example, if you use Event Hubs with [Azure Express Route][express-route], you can create a **firewall rule** to allow traffic from only your on-premises infrastructure IP addresses.
21
22
22
-
## When to use
23
+
## IP firewall rules
24
+
The IP firewall rules are applied at the Event Hubs namespace level. Therefore, the rules apply to all connections from clients using any supported protocol. Any connection attempt from an IP address that does not match an allowed IP rule on the Event Hubs namespace is rejected as unauthorized. The response does not mention the IP rule. IP filter rules are applied in order, and the first rule that matches the IP address determines the accept or reject action.
23
25
24
-
If you are looking to setup your Event Hubs namespace such that it should receive traffic from only a specified range of IP addresses and reject everything else, then you can leverage a *Firewall rule* to block Event Hub endpoints from other IP addresses. For example, if you use Event Hubs with [Azure Express Route][express-route], you can create a *Firewall rule* to restrict the traffic from your on-premises infrastructure IP addresses.
26
+
## Use Azure portal
27
+
This section shows you how to use the Azure portal to create IP firewall rules for an Event Hubs namespace.
25
28
26
-
## How filter rules are applied
29
+
1. Navigate to your **Event Hubs namespace** in the [Azure portal](https://portal.azure.com).
30
+
2. On the left menu, select **Networking** option. By default, the **All networks** option is selected. Your event hub accepts connections from any IP address. This default setting is equivalent to a rule that accepts the 0.0.0.0/0 IP address range.
27
31
28
-
The IP filter rules are applied at the Event Hubs namespace level. Therefore, the rules apply to all connections from clients using any supported protocol.
32
+

33
+
1. Select the **Selected networks** option at the top of the page. In the **Firewall** section, follow these steps:
34
+
1. Select **Add your client IP address** option to give your current client IP the access to the namespace.
35
+
2. For **address range**, enter a specific IPv4 address or a range of IPv4 address in CIDR notation.
36
+
3. Specify whether you want to **allow trusted Microsoft services to bypass this firewall**.
29
37
30
-
Any connection attempt from an IP address that does not match an allowed IP rule on the Event Hubs namespace is rejected as unauthorized. The response does not mention the IP rule.
38
+

39
+
3. Select **Save** on the toolbar to save the settings. Wait for a few minutes for the confirmation to show up on the portal notifications.
31
40
32
-
## Default setting
33
41
34
-
By default, the **IP Filter** grid in the portal for Event Hubs is empty. This default setting means that your event hub accepts connections from any IP address. This default setting is equivalent to a rule that accepts the 0.0.0.0/0 IP address range.
35
-
36
-
## IP filter rule evaluation
37
-
38
-
IP filter rules are applied in order, and the first rule that matches the IP address determines the accept or reject action.
39
-
40
-
>[!WARNING]
41
-
> Implementing Firewalls can prevent other Azure services from interacting with Event Hubs.
42
-
>
43
-
> Trusted Microsoft services are not supported when IP Filtering (Firewalls) are implemented, and will be made available soon.
44
-
>
45
-
> Common Azure scenarios that don't work with IP Filtering (note that the list is **NOT** exhaustive) -
46
-
> - Azure Stream Analytics
47
-
> - Integration with Azure Event Grid
48
-
> - Azure IoT Hub Routes
49
-
> - Azure IoT Device Explorer
50
-
>
51
-
> The below Microsoft services are required to be on a virtual network
52
-
> - Azure Web Apps
53
-
> - Azure Functions
54
-
55
-
### Creating a Firewall rule with Azure Resource Manager templates
42
+
## Use Resource Manager template
56
43
57
44
> [!IMPORTANT]
58
45
> Firewall rules are supported in **standard** and **dedicated** tiers of Event Hubs. It's not supported in basic tier.
Copy file name to clipboardExpand all lines: articles/event-hubs/event-hubs-service-endpoints.md
+36-27Lines changed: 36 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,48 +21,56 @@ The integration of Event Hubs with [Virtual Network (VNet) Service Endpoints][vn
21
21
22
22
Once configured to bound to at least one virtual network subnet service endpoint, the respective Event Hubs namespace no longer accepts traffic from anywhere but authorized subnets in virtual networks. From the virtual network perspective, binding an Event Hubs namespace to a service endpoint configures an isolated networking tunnel from the virtual network subnet to the messaging service.
23
23
24
-
The result is a private and isolated relationship between the workloads bound to the subnet and the respective Event Hubs namespace, in spite of the observable network address of the messaging service endpoint being in a public IP range. There is an exception to this behavior. Enabling a service endpoint, by default, enables the denyall rule in the IP firewall associated with the virtual network. You can add specific IP addresses in the IP firewall to enable access to the Event Hub public endpoint.
25
-
26
-
27
-
>[!WARNING]
28
-
> Implementing Virtual Networks integration can prevent other Azure services from interacting with Event Hubs.
29
-
>
30
-
> Trusted Microsoft services are not supported when Virtual Networks are implemented.
31
-
>
32
-
> Common Azure scenarios that don't work with Virtual Networks (note that the list is **NOT** exhaustive) -
33
-
> - Integration with Azure Monitor. You can't stream diagnostic logs from **other** Azure services into Event Hubs. However, you can enable Azure diagnostic logs on the event hub itself. It's the same case when you have the firewall (IP filtering) enabled.
34
-
> - Azure Stream Analytics
35
-
> - Integration with Azure Event Grid
36
-
> - Azure IoT Hub Routes
37
-
> - Azure IoT Device Explorer
38
-
>
39
-
> The below Microsoft services are required to be on a virtual network
40
-
> - Azure Web Apps
41
-
> - Azure Functions
24
+
The result is a private and isolated relationship between the workloads bound to the subnet and the respective Event Hubs namespace, in spite of the observable network address of the messaging service endpoint being in a public IP range. There is an exception to this behavior. Enabling a service endpoint, by default, enables the `denyall` rule in the [IP firewall](event-hubs-ip-filtering.md) associated with the virtual network. You can add specific IP addresses in the IP firewall to enable access to the Event Hub public endpoint.
42
25
43
26
> [!IMPORTANT]
44
-
> Virtual networks are supported in **standard** and **dedicated** tiers of Event Hubs. It's not supported in basic tier.
27
+
> Virtual networks are supported in **standard** and **dedicated** tiers of Event Hubs. It's not supported in the **basic** tier.
45
28
46
29
## Advanced security scenarios enabled by VNet integration
47
30
48
31
Solutions that require tight and compartmentalized security, and where virtual network subnets provide the segmentation between the compartmentalized services, still need communication paths between services residing in those compartments.
49
32
50
-
Any immediate IP route between the compartments, including those carrying HTTPS over TCP/IP, carries the risk of exploitation of vulnerabilities from the network layer on up. Messaging services provide completely insulated communication paths, where messages are even written to disk as they transition between parties. Workloads in two distinct virtual networks that are both bound to the same Event Hubs instance can communicate efficiently and reliably via messages, while the respective network isolation boundary integrity is preserved.
33
+
Any immediate IP route between the compartments, including those carrying HTTPS over TCP/IP, carries the risk of exploitation of vulnerabilities from the network layer on up. Messaging services provide insulated communication paths, where messages are even written to disk as they transition between parties. Workloads in two distinct virtual networks that are both bound to the same Event Hubs instance can communicate efficiently and reliably via messages, while the respective network isolation boundary integrity is preserved.
51
34
52
35
That means your security sensitive cloud solutions not only gain access to Azure industry-leading reliable and scalable asynchronous messaging capabilities, but they can now use messaging to create communication paths between secure solution compartments that are inherently more secure than what is achievable with any peer-to-peer communication mode, including HTTPS and other TLS-secured socket protocols.
53
36
54
-
## Bind Event Hubs to Virtual Networks
37
+
## Bind event hubs to virtual networks
38
+
39
+
**Virtual network rules** are the firewall security feature that controls whether your Azure Event Hubs namespace accepts connections from a particular virtual network subnet.
40
+
41
+
Binding an Event Hubs namespace to a virtual network is a two-step process. You first need to create a **virtual Network service endpoint** on a virtual network's subnet and enable it for **Microsoft.EventHub** as explained in the [service endpoint overview][vnet-sep] article. Once you have added the service endpoint, you bind the Event Hubs namespace to it with a **virtual network rule**.
42
+
43
+
The virtual network rule is an association of the Event Hubs namespace with a virtual network subnet. While the rule exists, all workloads bound to the subnet are granted access to the Event Hubs namespace. Event Hubs itself never establishes outbound connections, doesn't need to gain access, and is therefore never granted access to your subnet by enabling this rule.
44
+
45
+
## Use Azure portal
46
+
This section shows you how to use Azure portal to add a virtual network service endpoint. To limit access, you need to integrate the virtual network service endpoint for this Event Hubs namespace.
47
+
48
+
1. Navigate to your **Event Hubs namespace** in the [Azure portal](https://portal.azure.com).
49
+
2. On the left menu, select **Networking** option. By default, the **All networks** option is selected. Your event hub accepts connections from any IP address. This default setting is equivalent to a rule that accepts the 0.0.0.0/0 IP address range.
50
+
51
+

52
+
1. Select the **Selected Networks** option at the top of the page.
53
+
2. In the **Virtual Network** section of the page, select **+Add existing virtual network***.
3. Select the virtual network from the list of virtual networks, and then pick the **subnet**. You have to enable the service endpoint before adding the virtual network to the list. If the service endpoint isn't enabled, the portal will prompt you to enable it.
4. You should see the following successful message after the service endpoint for the subnet is enabled for **Microsoft.EventHub**. Select **Add** at the bottom of the page to add the network.
61
+
62
+

55
63
56
-
*Virtual network rules* are the firewall security feature that controls whether your Azure Event Hubs namespace accepts connections from a particular virtual network subnet.
64
+
> [!NOTE]
65
+
> If you are unable to enable the service endpoint, you may ignore the missing virtual network service endpoint using the Resource Manager template. This functionality is not available on the portal.
66
+
6. Select **Save** on the toolbar to save the settings. Wait for a few minutes for the confirmation to show up on the portal notifications.
57
67
58
-
Binding an Event Hubs namespace to a virtual network is a two-step process. You first need to create a **Virtual Network service endpoint** on a Virtual Network subnet and enable it for "Microsoft.EventHub" as explained in the [service endpoint overview][vnet-sep]. Once you have added the service endpoint, you bind the Event Hubs namespace to it with a *virtual network rule*.
The virtual network rule is an association of the Event Hubs namespace with a virtual network subnet. While the rule exists, all workloads bound to the subnet are granted access to the Event Hubs namespace. Event Hubs itself never establishes outbound connections, does not need to gain access, and is therefore never granted access to your subnet by enabling this rule.
61
70
62
-
### Create a virtual network rule with Azure Resource Manager templates
71
+
##Use Resource Manager template
63
72
64
-
The following Resource Manager template enables adding a virtual network rule to an existing Event Hubs
65
-
namespace.
73
+
The following Resource Manager template enables adding a virtual network rule to an existing Event Hubs namespace.
0 commit comments