Range of ports to be open

DABREOBLANCHEBCONE-1480 10 Reputation points
2025-10-01T10:48:16.39+00:00

open Media port range 10000-20000 in single load balancing rule (Azure Standard Load balancer)

Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 68,535 Reputation points MVP Volunteer Moderator
    2025-10-01T11:05:07.8133333+00:00

    In Azure Standard Load Balancer, you can open a whole port range in one load balancing rule — you don't need to define a rule per port.

    Azure Portal

    1. Go to your Standard Load Balancer in the portal.
    2. Select Load balancing rules > + Add.
    3. Configure the rule:
      • Frontend IP address → Choose your frontend.
      • Backend pool → Choose the backend pool.
      • Protocol → TCP, UDP, or Both (depending on your workload).
      • Port → Enter a single number if it's one port, but for ranges:
      • Frontend Port Range → 10000-20000
      • Backend Port Range → 10000-20000
      • Other options (session persistence, idle timeout, health probes) → configure as required.
    4. Save.

    Azure CLI

    az network lb rule create \
      --resource-group MyResourceGroup \
      --lb-name MyLoadBalancer \
      --name MediaPortsRule \
      --protocol Udp \
      --frontend-port-range-start 10000 \
      --frontend-port-range-end 20000 \
      --backend-port-range-start 10000 \
      --backend-port-range-end 20000 \
      --frontend-ip-name MyFrontend \
      --backend-pool-name MyBackendPool \
      --probe-name MyHealthProbe
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    1 person found this answer helpful.

  2. Jeevan Shanigarapu 3,355 Reputation points Microsoft External Staff Moderator
    2025-10-01T11:59:59.09+00:00

    Hello @DABREOBLANCHEBCONE,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand your question regarding opening the media port range 10000–20000 in a single load balancing rule on an Azure Standard Load Balancer.

    You can configure a Port Range in One Rule, the Azure Standard Load Balancer allows you to set a continuous port range (such as 10000–20000) in a single load balancing rule. This feature is often used for media streaming, VoIP, or real-time communication scenarios that require multiple open ports.

    Steps for Configure:

    In the Azure Portal, open your Load Balancer.

    Navigate to Load balancing rules and click Add.

    Set up the rule with these options:

    ·       Frontend Port: 10000-20000

    ·       Backend Port: 10000-20000 (or specify a single port if needed)

    ·       Protocol: Choose UDP or TCP based on your application's requirement.

    ·       Backend Pool: Select your backend pool.

    ·       Health Probe: Use an existing probe (TCP/HTTP/HTTPS).

    Click Save to apply the rule.

    If you are unable to config via Azure portal, you can config via CLI.

    az network lb rule create \
      --resource-group MyResourceGroup \
      --lb-name MyLoadBalancer \
      --name MediaPortsRule \
      --protocol Udp \
      --frontend-port-range-start 10000 \
      --frontend-port-range-end 20000 \
      --backend-port-range-start 10000 \
      --backend-port-range-end 20000 \
      --frontend-ip-name MyFrontend \
      --backend-pool-name MyBackendPool \
      --probe-name MyHealthProbe
    

    Note: Port range rules are only available with the Azure Standard Load Balancer and not with the Basic SKU. When setting up these rules, make sure your Network Security Groups (NSGs) and firewall settings also permit traffic for the specified port range to prevent connectivity problems. For UDP traffic, use a TCP or HTTP health probe since UDP probes are not supported in Azure Load Balancer. Because this setup uses a large port range, it’s best to review the configuration for security and limit access to trusted sources to keep the network secure.

    __Azure load balancer overview: What is Azure Load Balancer? - Azure Load Balancer | Microsoft Learn

    Kindly let us know if the above helps or you need further assistance on this issue.

    Please do not forget to "Accept the answer” and “up-vote it” wherever the information provided helps you, this can be beneficial to other community members__.__ It would be greatly appreciated and helpful to others.

    1 person found this answer helpful.

Your answer

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