Secure Connection to Azure Event Hub via Public Endpoint: Firewall Configuration Best Practices

Suki Azure 66 Reputation points
2025-03-24T08:12:25.1133333+00:00

We have an Azure tenant and subscription (ABC) with the following services running: Azure Firewall, Azure Event Hub, and Databricks. My customer is in a separate tenant and subscription (XYZ) and needs to send data to our Azure Event Hub via a Public Endpoint (Private Endpoint is not an option in this case).

I have received the customer's public IP address and added it to the Azure Event Hub Networking Firewall under "Add IP ranges to allow access from the internet or your on-premises networks."

Questions:

Is adding the customer's public IP to the Azure Event Hub Networking Firewall sufficient for secure connectivity?

Do I need to create an Azure Firewall Network Rule as well?

How do I create this rule? Should I configure a Network Rule or an Application Rule in Azure Firewall?

By creating this rule, how does Azure Firewall route traffic to Azure Event Hub?

  1. When both the Azure Firewall Network Rule and Azure Event Hub Firewall whitelist are properly configured, is this considered a best practice? What are the pros and cons of this approach?

Looking forward to insights and recommendations on this scenario.

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
711 questions
{count} votes

Accepted answer
  1. Alex Burlachenko 4,550 Reputation points
    2025-03-24T12:58:59.6433333+00:00

    Hi, Suki Azure,

    I would like simple add answers of my collogues and answer to urs Q.

    Is adding the customer's public IP to the Event Hub firewall sufficient?

    Yes, but with caveats:

    • Provides basic IP-based access control
    • Lacks advanced security features (threat inspection, logging)
    • Recommended to combine with SAS tokens for production workloads

    Do I need an Azure Firewall rule too?

    • Recommended for:
      • Additional security layer
      • Traffic logging/monitoring
      • Future scalability (if more partners need access)

    How to create the firewall rule? Use an Application Rule (not Network Rule):

    # Create Application Rule
    

    How does traffic flow with Azure Firewall?!

    • Traffic path: Customer ->Azure Firewall (inspection) -> Event Hub
    • Requires:
      1. A Route Table directing Event Hub traffic to Azure Firewall
      2. Firewall's public IP as the allowed IP in Event Hub firewall
      3. NAT rule if using Firewall's public IP (optional)

    And at the end links for official MSFT doc's

    1. Azure Event Hub IP Filtering (Your Current Setup)
    2. Azure Firewall Integration
    3. Combined Architecture
    4. Routing Configuration
    5. Advanced Security
    6. Cross-Tenant Considerations

    Hope that's will finally show u all clear picture.

    Best regards,

    Alex

    P.S. If my answer help to you, please Accept my answer


1 additional answer

Sort by: Most helpful
  1. Marten Theunissen 676 Reputation points
    2025-03-24T11:56:09.6133333+00:00

    Adding the customer's public IP to the Azure Event Hub Networking Firewall is a good step towards securing connectivity, but it may not be sufficient on its own. Here are some additional best practices to ensure secure connectivity:

    Best Practices for Secure Connectivity

    IP Firewall Rules:

    Configure IP firewall rules to restrict access to specific IPv4 or IPv6 addresses or address ranges in CIDR notation. This helps ensure that only traffic from known and trusted IP addresses can access your Event Hub.

    Virtual Network Service Endpoints:

    Integrate Event Hubs with Virtual Network Service Endpoints to enable secure access from workloads bound to virtual networks. This ensures that network traffic is secured on both ends and only authorized subnets can access the Event Hub.

    Private Endpoints:

    Use private endpoints to connect securely to your Event Hub. Private endpoints allow you to access Azure services over a private IP address within your virtual network.

    Service Tags:

    Utilize service tags to define network access controls on network security groups or Azure Firewall. Service tags represent a group of IP address prefixes from a given Azure service, simplifying the management of frequent updates to network security rules.

    Network Security Groups (NSGs):

    Implement NSGs to control inbound and outbound traffic to your Event Hub. NSGs can be used to create rules that allow or deny traffic based on IP addresses, ports, and protocols.

    Azure Defender for Event Hubs:

    Enable Azure Defender for Event Hubs to provide advanced threat protection and security monitoring. This helps detect and respond to potential security threats in real-time.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.