Skip to main content

Permission denied opening UDP socket with static IP

I have made a Linux program that sends UDP packets to a lighting controller. This works under both Ubuntu and Mac OS X. I configured an ethernet port to have a static IP address (with the correct netmask). The ethernet cable pugs straight from the controller device into the Pi.

The app runs on the Pi but I get a 'permission denied' error when trying to open a UDP socket. I edited the dhcpcd.conf file as per these instructions, so I am now able to ping the box and open its web interface in browser; yet I still get the error.

My settings are:

interface eth0
static ip_address=10.0.10.10/24
static routers=10.0.1.1
static domain_name_servers=10.0.1.1

The device's IP is 10.0.1.101, so I have also tried setting those routers and domain_name_servers, to that; but that didn't work either. Is there some additional network configuration I should try that includes specifying the netmask or something?

Any advice is appreciated!