# UDP Port Binding Fail

**URL:** <https://forum.inductiveautomation.com/t/udp-port-binding-fail/61453>\
**Category:** Ignition\
**Created:** [July 2, 2022, 12:20am UTC](https://forum.inductiveautomation.com/t/udp-port-binding-fail/61453 "2022-07-02T00:20:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob.ramirez](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jacob.ramirez](https://forum.inductiveautomation.com/u/jacob.ramirez)\
**Post date:** [July 2, 2022, 12:20am UTC](https://forum.inductiveautomation.com/t/udp-port-binding-fail/61453/1 "2022-07-02T00:20:17Z")

</div>

What would cause a UDP device from binding to a port on itself?  
I’m getting an error of `Permission denied (Bind failed)` on a port on the server Ignition is on. I’ve used localhost and the IP address of the server and still the same error.

---

<div class="post-metadata">

**Author:** ![plo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/plo/32/33875_2.png) [@plo](https://forum.inductiveautomation.com/u/plo)\
**Post date:** [July 13, 2022, 9:19pm UTC](https://forum.inductiveautomation.com/t/udp-port-binding-fail/61453/2 "2022-07-13T21:19:58Z")

</div>

Hello Jacob,  
What OS are you using and what port number are you trying to bind to?

I know that on Linux ports below 1024 are considered privileged and can only be bound with the "root" user. Similar to what's described in this stack overflow post.

> <https://stackoverflow.com/questions/20396820/socket-programing-permission-denied>

and in this forum post

> [@Automation Professionals' Advanced Modbus Driver](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/23):
>
> Hi @pturmel any chance you’re Modbus Driver supports function code 23? I don’t see it listed above. We’ve had to use UCON in the past to build this out but would prefer something of the shelf. There is an oven controller we’re working with that requires it:

---

<div class="post-metadata">

**Author:** ![jacob.ramirez](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jacob.ramirez](https://forum.inductiveautomation.com/u/jacob.ramirez)\
**Post date:** [July 13, 2022, 11:55pm UTC](https://forum.inductiveautomation.com/t/udp-port-binding-fail/61453/3 "2022-07-13T23:55:20Z")

</div>

Yep. That was the problem. I switched to a higher port number and it connected.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 14, 2022, 12:32am UTC](https://forum.inductiveautomation.com/t/udp-port-binding-fail/61453/4 "2022-07-14T00:32:10Z")

</div>

I recommend the AmbientCapabilities clause in this comment (same topic):

> [@Automation Professionals' Advanced Modbus Driver](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/22):
>
> Instead of running as root, I recommend adding the following in your systemd configuration: [Service] AmbientCapabilities=CAP\_NET\_BIND\_SERVICE

You can stay on the standard HTTP and HTTPS ports while not running as root.
