RoboSecurity™.io

Guide · ROS 2

ROS 2 security: SROS2, DDS and network hardening

By default, ROS 2 nodes discover each other and exchange messages with no authentication or encryption. Anything on the same network can read and publish topics, including motion commands. To secure ROS 2, turn on SROS2 in Enforce mode, limit discovery to the hosts that need it, keep robots on an isolated network and close bridges that expose ROS to the web.

By Yigal Behar · Updated October 16, 2026

Why ROS 2 is open by default

ROS 2 communicates over DDS. Out of the box, DDS discovery uses multicast on the local network, and any process that joins the same ROS domain can list, subscribe to and publish on every topic. For domain 0, discovery and data traffic use UDP ports starting at 7400.

ROS_DOMAIN_ID keeps separate systems from interfering with each other, but it isn't a security control. Anyone can set the same domain ID.

ROS 1 is weaker still. The ROS master on TCP port 11311 accepts registrations and commands from anyone who can reach it. ROS 1 Noetic reached end of life in May 2025, so ROS 1 robots should be isolated and moved to ROS 2.

What SROS2 adds

DDS Security pluginWhat it does
AuthenticationEach node, or enclave, gets a certificate from your own certificate authority. Nodes without a valid certificate can't join.
Access controlSigned governance and permissions files define which enclaves may publish or subscribe on which topics.
CryptographyTopic data is signed and can be encrypted, so it can't be read or altered on the network.

Turning on SROS2

The basic steps with the ROS 2 command-line tools:

# 1. Create a keystore (your certificate authority)
ros2 security create_keystore ~/sros2_keystore

# 2. Create an enclave for each node or group of nodes
ros2 security create_enclave ~/sros2_keystore /cell1/arm_controller

# 3. Turn security on and enforce it
export ROS_SECURITY_KEYSTORE=~/sros2_keystore
export ROS_SECURITY_ENABLE=true
export ROS_SECURITY_STRATEGY=Enforce

# 4. Start the node in its enclave
ros2 run my_pkg arm_controller --ros-args --enclave /cell1/arm_controller

Then tighten permissions so each enclave can use only the topics it needs, with ros2 security create_permission and a policy file. Keep the keystore's private keys off the robots, and test in Enforce mode before production. Permissive mode lets nodes without security keep connecting, so use it only for testing.

Network exposures to close

ROS 2 security checklist

  1. Isolate. Put ROS robots on their own network segment, behind a firewall.
  2. Enable SROS2. Create a keystore, give every node an enclave and set the strategy to Enforce.
  3. Least privilege. Write permissions so each enclave can use only its own topics.
  4. Limit discovery. Restrict the discovery range to localhost or the subnet that needs it.
  5. Close bridges. Bind rosbridge and dashboards to localhost or protect them with authentication.
  6. Protect keys. Keep the certificate authority's private key off the robots and rotate enclave certificates.
  7. Update. Stay on a supported ROS 2 distribution and operating system.
  8. Retire ROS 1. Isolate remaining ROS 1 systems and plan their migration.

Common questions

Is ROS_DOMAIN_ID a security feature?

No. It separates systems so they don't interfere with each other, but anyone on the network can set the same domain ID and join.

Does SROS2 slow robots down?

Signing and encryption add some processing and latency. On most robots the overhead is manageable, but test control loops with security on before production. Where timing is tight, governance files can require signing without encryption for specific topics.

Is ROS 1 secure?

ROS 1 has no built-in authentication or encryption, and Noetic reached end of life in May 2025. Isolate ROS 1 robots on their own network and plan a move to ROS 2 with SROS2.

Robot cell acting up?

24/7 robot incident line: 646-560-5083. Not urgent? Book an exposure assessment and an engineer replies within one business day.

Related