auditd Rule Builder

Compose one kernel audit rule: watch a file or directory, or filter named system calls, and get the exact audit.rules line.

Rule
both forms land on the exit list with the always action
both writes two lines because syscall numbers differ
dir is recursive and stops at mount points
absolute, with no spaces or quotes
Access that triggers the rule
Key
up to 31 characters; ausearch -k finds these events
Press Compose rule to build the sample rule.

The kernel checks syscall rules for every program on the machine, so keep the rule count low and combine syscalls in one rule. On a 64-bit x86 machine the 32-bit compatibility calls are a separate table, which is why the both option writes two lines with b32 and b64. A directory watch follows the whole subtree but stops at a mount point below it. This page only composes text: it reads nothing from your machine and cannot load, list or remove rules.