12.9. Using augenrules to define persistent rules
The augenrules
script reads rules located in the /etc/audit/rules.d/
directory and compiles them into an audit.rules
file. This script processes all files that end with .rules
in a specific order based on their natural sort order. The files in this directory are organized into groups with the following meanings:
- 10 - Kernel and auditctl configuration
- 20 - Rules that could match general rules but you want a different match
- 30 - Main rules
- 40 - Optional rules
- 50 - Server-specific rules
- 70 - System local rules
- 90 - Finalize (immutable)
The rules are not meant to be used all at once. They are pieces of a policy that should be thought out and individual files copied to /etc/audit/rules.d/
. For example, to set a system up in the STIG configuration, copy rules 10-base-config
, 30-stig
, 31-privileged
, and 99-finalize
.
Once you have the rules in the /etc/audit/rules.d/
directory, load them by running the augenrules
script with the --load
directive:
# augenrules --load
/sbin/augenrules: No change
No rules
enabled 1
failure 1
pid 742
rate_limit 0
...
Ressources supplémentaires
-
audit.rules(8)
andaugenrules(8)
man pages.