Robotics StackExchange | Archived questions

Constraining the ports that ROS use

Hello,

Is there anyway to constrain the ports that ROS uses, [i.e: the ports that publishers and subscribers use] to a range, such as 30000-40000? Right now, it arbitrarily uses a port from >1024 to < 65536

This is required so I can proxy a ros container inside LXD, running on RPI4.

Best regards, C.A.

Asked by wintermute on 2020-10-21 04:57:23 UTC

Comments

This reads like a duplicate of at least #q245273 and #q268213, and a very old one: #q12206.

That last one also has a tip for how you could approach this, but know that limiting the ephemeral range will do this for all processes, not just ROS nodes.

Asked by gvdhoorn on 2020-10-21 06:03:03 UTC

As this is a duplicate, I'm going to close it.

Asked by gvdhoorn on 2020-10-21 06:03:17 UTC

Answers