I am setting up node red on a raspberry pi to act as a protocol adaptor. I would like to have node red listen for a connection on port 23. I have a piece of old equipment that wants to connect to the pie using port 23, it would be nice for me to not change this. When I add a 'tcp in' node and set it up for port 23 I get the following error.
"unable to listen on port 23, error: Error: listen EACCES: permission denied 0.0.0.0:23"
Is there a way to set up the pie where nod red has access to port 23?
You don't say which OS you have installed but I'll assume it's some brand of Linux. As a security measure only root can listen on ports <1024 which is why you get
So you need to find out which group allows a non-root user to access those ports on your Linux and assign that group to the user node-red is running as. If there is no such group then you'll have to run node-red as root and that is NOT a good idea.
Marginally, still not a great idea though. Simple solutions now have a nasty habit of turning into nightmare's later. Say 2 years later when you've forgotten all about the original setup and suddenly realise you've an underutilised server sitting there and wouldn't it be a good idea to use that to serve up some fancy website on the cheap or extend your boiler controls to the Internet.
More importantly though, experience shows that you will end up tied in permissions knots at some point.