This content originally appeared on DEV Community and was authored by Richard Chamberlain
Introduction
In a previous phase of this robotics project, Suricata was installed as part of the initial system build. At that stage, only a few basic rules were added for initial monitoring purposes. Now that the core application stack is largely in place, it's time to take a deeper look into how the robot is interacting with the network. Understanding these interactions is critical not only for security but also for diagnosing system behavior during development and deployment.
Table of Contents
- Introduction
- Why Monitor Robot Network Traffic?
- Understanding Suricata
- Creating and Using Suricata Rules
- Distilling Suricata Logs with Python
- Conclusion and Next Steps
Why Monitor Robot Network Traffic?
Modern robots often require multiple forms of network connectivity. For instance, a robot may have:
- A wired Ethernet (RJ45) connection for direct terminal access.
- WiFi connectivity for remote ROS 2 command input and mobile web interface access.
- The ability to create its own access point for issuing ROS 2 commands or enabling remote monitoring.
- Cellular network access when out of range of local WiFi.
With all these interfaces, it's essential to monitor who is accessing the robot and what services or application ports are being used. Suricata provides a powerful way to achieve this by performing deep packet inspection and generating actionable alerts based on defined rules.
Understanding Suricata
Suricata is an open-source application designed for deep packet inspection, intrusion detection, and optionally, intrusion prevention. Unlike a traditional firewall, which typically filters traffic based on IP addresses, ports, and simple protocol rules, Suricata analyzes network packets at a much deeper level.
By default, Suricata operates in Intrusion Detection System (IDS) mode, logging and reporting network traffic anomalies. It can be configured to act as an Intrusion Prevention System (IPS), but for the purpose of this discussion, we focus on its IDS capabilities.
Creating and Using Suricata Rules
One of Suricata's core features is its rules engine. These rules allow users to define conditions under which alerts should be triggered. When a packet matches a rule, Suricata logs an entry with a message, classification, and other details.
Here's an example of Suricata rules tailored to monitor ROS 2 traffic:
alert udp any 49152:65535 -> any any (msg:"[ROS2-02] OutgoingDDS Data Traffic Detected"; sid:100002; rev:1; classtype:not-suspicious;)
alert udp any any -> any 7400:7500 (msg:"[ROS2-03] Incoming DDS Discovery Traffic to ROS2 Node"; sid:100001; rev:2; classtype:not-suspicious;)
alert udp any 7400:7500 -> any any (msg:"[ROS2-04] Outgoing DDS Discovery Packet from ROS2 Node"; sid:100003; rev:1; classtype:not-suspicious;)
These rules help capture ROS 2-specific discovery and data traffic, flagging it for further analysis. However, Suricata can generate a high volume of logs, making manual inspection challenging.
Distilling Suricata Logs with Python
To manage this data more effectively, a custom Python script can be used to distill Suricata log entries into a summary format. This script groups logs by IP addresses and applications, providing a clearer view of network interactions.
Sample distilled log output:
Application,Classification,Source IP,Destination IP,Count
[ROS2-02] OutgoingDDS Data Traffic Detected,Not Suspicious Traffic,192.168.178.11,8.8.8.8,127
[ROS2-02] OutgoingDDS Data Traffic Detected,Not Suspicious Traffic,192.168.178.11,185.125.190.58,21
[SSH-10] Incoming SSH Connection Attempt,Attempted Administrator Privilege Gain,192.168.178.1,192.168.178.11,2
...
This output reveals interesting traffic patterns, such as unexpected outbound connections or potential intrusion attempts. The full Python summarizer script is available here.
Conclusion and Next Steps
While using Suricata on a robot may initially seem excessive, it's a powerful tool during development. Robotics systems integrate complex combinations of hardware and software, and it's crucial to verify the sources and destinations of all network traffic.
For more robust monitoring, consider integrating Suricata with advanced log analysis platforms like the ELK Stack or Graylog. These platforms can provide real-time dashboards, alerting, and deeper insights into your robot’s network behavior.
By leveraging Suricata and tailored tools like the Python distiller, developers gain critical visibility into the robot's communication landscape—an invaluable asset for building secure and reliable robotic systems.
Need Linux expertise? I help businesses streamline servers, secure infrastructure, and automate workflows. Whether you're troubleshooting, optimizing, or building from scratch—I've got you covered.
📬 Drop a comment or email me to collaborate. For more tutorials, tools, and insights, visit sebostechnology.com.
This content originally appeared on DEV Community and was authored by Richard Chamberlain

Richard Chamberlain | Sciencx (2025-07-03T00:03:32+00:00) SSH Over Tor: Cool, Practical, or Just Tinfoil Hats?. Retrieved from https://www.scien.cx/2025/07/03/ssh-over-tor-cool-practical-or-just-tinfoil-hats/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.