This repository has been archived by the owner on Oct 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default ignore rule is tricky because it needs to be removed first when setting up own rules. We should at least document this. We can also tweak the defaults independently from having docs (as long as the docs are updated). See flatcar-archive/coreos-overlay#2545
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Setting up the Linux Auditing System | ||
linktitle: Set up audit | ||
description: Setting up the Linux Auditing System. | ||
weight: 20 | ||
--- | ||
|
||
On Flatcar Container Linux `audit-rules.service` loads the audit rules to set up the logging filters for the kernel messages. | ||
The `auditd.service` daemon to collect these logs does not run by default. | ||
|
||
# Enabling the standard rules or custom rules | ||
|
||
The is an ignore rule by default that suppresses the standard rules, which means that certain PAM audit messages are not shown. | ||
It is also important to remove this default ignore rule when setting up own rules, or otherwise they will be ignored, too. | ||
The following Butane Config will overwrite the default ignore rule: | ||
|
||
```yaml | ||
variant: flatcar | ||
version: 1.0.0 | ||
storage: | ||
files: | ||
- path: /etc/audit/rules.d/99-default.rules | ||
overwrite: true | ||
contents: | ||
inline: | | ||
# custom rules may go here, can be empty to use only the standard rules | ||
``` | ||
# Enabling auditd | ||
In addition to the above, it may make sense to enable `auditd.service`, here a Butane Config snippet for that: | ||
|
||
```yaml | ||
variant: flatcar | ||
version: 1.0.0 | ||
systemd: | ||
units: | ||
- name: auditd.service | ||
enabled: true | ||
``` |