
If you want to detect, monitor, contain and block AI agents on an Ubuntu server, you need several layers of security. No single tool can reliably stop an agent from escaping its permitted environment.
Will use a server case running Ubuntu and Docker.
- Detect unauthorised agent activity.
- Monitor files, processes and network connections.
- Prevent access to unauthorised files and services.
- Stop suspicious processes and containers.
- Preserve logs and evidence for investigation.
1. Tools for detecting and blocking agents
| Tool | Detects / blocks | Main purpose |
|---|---|---|
| Falco | Detects | Detects suspicious processes, system calls, container escapes and file access. Falco |
| Wazuh | Detects + responds | Monitors files, processes, logs, vulnerabilities and can trigger blocking actions. Components ยท Wazuh documentation+1 |
| Tetragon | Detects + enforces | eBPF-based runtime security and process/network policy enforcement. |
| auditd | Detects / records | Records who accessed files, executed commands and changed system settings. |
| osquery | Detects | Investigates running processes, users, services and system configuration. |
| Suricata | Detects + blocks | Network intrusion detection and prevention. |
| CrowdSec | Detects + blocks | Identifies malicious IP addresses and coordinates blocking decisions. |
| Fail2ban | Blocks | Blocks repeated suspicious login attempts. |
| ClamAV | Detects | Scans files for known malware. |
| AIDE | Detects | Detects unexpected changes to protected files. |
2. Tools that actually restrict agent behaviour
Detection is not enough. You also need enforcement.
| Tool | What it prevents |
|---|---|
| AppArmor | Restricts which files and resources a process can access. |
| Seccomp | Restricts which Linux system calls a process can execute. |
| nftables | Blocks unauthorised network connections. |
| gVisor | Adds an isolation layer between containers and the host kernel. |
| Docker rootless mode | Reduces the privileges available to Docker and its containers. |
| Bubblewrap | Creates restricted process environments and filesystem namespaces. |
These tools complement one another; none guarantees that every attack or escape will be prevented.
3. My recommended security stack for FocusCloud.dev
Recommended architecture
I would combine these tools rather than install everything.
FocusCloud Agent Defence
Falco + Tetragon
Runtime behaviour detection and enforcement
Wazuh + auditd
Monitoring, logging and investigation
AppArmor + Seccomp + Docker isolation
Restrict agent permissions and system access
nftables + Suricata
Network monitoring and blocking
4. What I would specifically watch for
For AI agents running through Langflow, Ollama or customer-created applications, establish alerts for:
- Agents attempting to read
/etc/shadow. - Attempts to access another customer’s project directory.
- Unexpected access to
/root. - Attempts to access Docker socket
/var/run/docker.sock. - Unexpected shell execution.
- Attempts to install packages or create new users.
- Unexpected outbound connections.
- Attempts to modify Nginx or firewall configuration.
- Attempts to access host filesystems from containers.
- Attempts to disable security monitoring.
Important: These tools detect suspicious behaviour, not whether a process is inherently an AI agent. You need process identity, container identity and behavioural policies to distinguish authorised agents from ordinary applications.
5. Installation priority
My suggested order:
- AppArmor โ restrict filesystem access.
- Docker isolation โ separate customer environments.
- Falco โ detect suspicious runtime behaviour.
- Wazuh โ central monitoring and response.
- nftables โ enforce network restrictions.
- Tetragon โ add advanced runtime enforcement.
Official documentation:
One important recommendation: Never give an AI agent unrestricted Docker socket access or root privileges. A monitoring tool cannot compensate for an agent that already has unrestricted control of the host.
For FocusCloud, I would start by implementing a security boundary around every customer agent, then add automatic detection and quarantine. Critical actions such as deleting files, terminating shared services or changing firewall rules should require human approval.
1
Discover more from CONTEXT EDUCATION
Subscribe to get the latest posts sent to your email.

