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
- Go to your Standard Load Balancer in the portal.
- Select Load balancing rules > + Add.
- 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.
- 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