Does Azure Web PubSub have a fixed public IP for outbound traffic?

Rafael Miranda 0 Reputation points
2024-07-22T11:41:20.34+00:00

I have a public load balancer handling the inbound traffic of an AKS cluster. This LB have an IP filter to external resources like API Management.
I was under the impression that Web PubSub would work in a similar way, the outbound requests would have the same public IP. But What I'm experiencing is different IPs for outbound traffic.

Is there any way to have only way outbound IP in Azure Web PubSub?

Azure Web PubSub
Azure Web PubSub
An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
79 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 18,646 Reputation points
    2024-08-08T15:37:22.43+00:00

    Hi @Rafael Miranda that's correct -Azure Web PubSub doesn’t natively support a single static outbound IP address like some other Azure services. However, you can achieve a similar effect by using a shared private endpoint. This allows you to route outbound traffic through a private link, ensuring that the traffic appears to come from a consistent IP address.

    Here’s a high-level overview of how you can set this up:

    1. In your Azure Web PubSub service, create a shared private endpoint that connects to your target resource (e.g., an Azure Function or Azure Web App).
    2. Ensure that the target resource approves the private endpoint connection.
    3. Set up the necessary network rules to allow traffic through this private endpoint.

    This setup ensures that all outbound traffic from your Azure Web PubSub service to the specified resource will use the private endpoint, giving you a consistent outbound IP address.

    Best,

    Grace


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.