# WebRTC UDP Port Recycle? Max Port Number

**URL:** <https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578>\
**Category:** Wowza Streaming Engine\
**Created:** [December 23, 2020, 9:10am UTC](https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578 "2020-12-23T09:10:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Han\_Sen](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@Han\_Sen](https://community.wowza.com/u/Han_Sen)\
**Post date:** [December 23, 2020, 9:10am UTC](https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578/1 "2020-12-23T09:10:30Z")

</div>

Hi, I’m currently trying to use webrtc  
On testing I found out that UDP Port that Wowza send as Ice Candidate can exceed 9999

 ![image](https://us1.discourse-cdn.com/flex002/uploads/wowza1/original/1X/b5a50af04866f7874088f37b73f28740678111ff.png)

Which in this document

> **[Set up WebRTC streaming with Wowza Streaming Engine](https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine)**
>
> Learn how to stream WebRTC with Wowza Streaming Engine.

It asked for 6970 - 9999  
I thought after 9999 it would restart again to the set DatagramStartingPort in Server.xml

is there anyway to limit the range of UDP port?  
Is there a way to recycle the count?

---

<div class="post-metadata">

**Author:** ![Egbert\_Williams](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/egbert_williams/32/453_2.png) [@Egbert\_Williams](https://community.wowza.com/u/Egbert_Williams)\
**Post date:** [December 23, 2020, 11:49pm UTC](https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578/2 "2020-12-23T23:49:06Z")

</div>

> [@Han\_Sen](#):
>
> is there anyway to limit the range of UDP port

You can limit the range by editing the server.xml file  
To your second question…I have not looked at this in a bit…but I believe in the setting you put it to select from the port pool dynamically. So it just select a free port in the pool you select.

---

<div class="post-metadata">

**Author:** ![Han\_Sen](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@Han\_Sen](https://community.wowza.com/u/Han_Sen)\
**Post date:** [December 24, 2020, 2:01am UTC](https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578/3 "2020-12-24T02:01:05Z")

</div>

> [@Egbert\_Williams](#):
>
> You can limit the range by editing the server.xml file

What is the name of the config?  
In RTP Part there is only 2 items which are the starting port and allow sharing port

> [@Egbert\_Williams](#):
>
> but I believe in the setting you put it to select from the port pool dynamically

I have done it that way, actually setting UDP Ice Candidate for WebRTC won’t ask you to specify a port number, it will be done dynamically unlike the TCP Port

---

<div class="post-metadata">

**Author:** ![Egbert\_Williams](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/egbert_williams/32/453_2.png) [@Egbert\_Williams](https://community.wowza.com/u/Egbert_Williams)\
**Post date:** [December 24, 2020, 4:20pm UTC](https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578/4 "2020-12-24T16:20:11Z")

</div>

UDP Ports 6970 - 9999 is the default pool. To limit you can edit it to the range that you want. Note make sure your firewall is adjusted.

---

<div class="post-metadata">

**Author:** ![Han\_Sen](https://avatars.discourse-cdn.com/v4/letter/h/96bed5/32.png) [@Han\_Sen](https://community.wowza.com/u/Han_Sen)\
**Post date:** [December 25, 2020, 1:06am UTC](https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578/5 "2020-12-25T01:06:50Z")

</div>

> [@Egbert\_Williams](#):
>
> To limit you can edit it to the range that you want. Note make sure your firewall is adjusted.

Please elaborate where to change the config, I found such config none unfortunately

---

<div class="post-metadata">

**Author:** ![Egbert\_Williams](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/egbert_williams/32/453_2.png) [@Egbert\_Williams](https://community.wowza.com/u/Egbert_Williams)\
**Post date:** [December 26, 2020, 6:52pm UTC](https://community.wowza.com/t/webrtc-udp-port-recycle-max-port-number/92578/6 "2020-12-26T18:52:24Z")

</div>

Please contact the support team for further clarification. The pool can be adjusted in the manager or editing server.xml. It can be increased or decreased using the start UDP port 6970 but will end at 9999.
