1AUDITD.CONF:(5) System Administration Utilities AUDITD.CONF:(5)
2
3
4
6 auditd.conf - audit daemon configuration file
7
9 The file /etc/audit/auditd.conf contains configuration information spe‐
10 cific to the audit daemon. Each line should contain one configuration
11 keyword, an equal sign, and then followed by appropriate configuration
12 information. All option names and values are case insensitive. The key‐
13 words recognized are listed and described below. Each line should be
14 limited to 160 characters or the line will be skipped. You may add com‐
15 ments to the file by starting the line with a '#' character.
16
17
18 local_events
19 This yes/no keyword specifies whether or not to include local
20 events. Normally you want local events so the default value is
21 yes. Cases where you would set this to no is when you want to
22 aggregate events only from the network. At the moment, this is
23 useful if the audit daemon is running in a container. This
24 option can only be set once at daemon start up. Reloading the
25 config file has no effect.
26
27 log_file
28 This keyword specifies the full path name to the log file where
29 audit records will be stored. It must be a regular file.
30
31 write_logs
32 This yes/no keyword determines whether or not to write logs to
33 the disk. Normally you want this so the default is yes.
34
35 log_format
36 The log format describes how the information should be stored on
37 disk. There are 2 options: raw and enriched. If set to RAW, the
38 audit records will be stored in a format exactly as the kernel
39 sends it. The ENRICHED option will resolve all uid, gid,
40 syscall, architecture, and socket address information before
41 writing the event to disk. This aids in making sense of events
42 created on one system but reported/analized on another system.
43 The NOLOG option is now deprecated. If you were setting this
44 format, now you should set the write_logs option to no.
45
46 log_group
47 This keyword specifies the group that is applied to the log
48 file's permissions. The default is root. The group name can be
49 either numeric or spelled out.
50
51 priority_boost
52 This is a non-negative number that tells the audit daemon how
53 much of a priority boost it should take. The default is 4. No
54 change is 0.
55
56 flush Valid values are none, incremental, incremental_async, data,
57 and sync. If set to none, no special effort is made to flush
58 the audit records to disk. If set to incremental, Then the freq
59 parameter is used to determine how often an explicit flush to
60 disk is issued. The incremental_async parameter is very much
61 like incremental except the flushing is done asynchronously for
62 higher performance. The data parameter tells the audit daemon to
63 keep the data portion of the disk file sync'd at all times. The
64 sync option tells the audit daemon to keep both the data and
65 meta-data fully sync'd with every write to disk. The default
66 value is incremental_async.
67
68 freq This is a non-negative number that tells the audit daemon how
69 many records to write before issuing an explicit flush to disk
70 command. This value is only valid when the flush keyword is set
71 to incremental or incremental_async.
72
73 num_logs
74 This keyword specifies the number of log files to keep if rotate
75 is given as the max_log_file_action. If the number is < 2, logs
76 are not rotated. This number must be 999 or less. The default
77 is 0 - which means no rotation. As you increase the number of
78 log files being rotated, you may need to adjust the kernel back‐
79 log setting upwards since it takes more time to rotate the
80 files. This is typically done in /etc/audit/audit.rules. If log
81 rotation is configured to occur, the daemon will check for
82 excess logs and remove them in effort to keep disk space avail‐
83 able. The excess log check is only done on startup and when a
84 reconfigure results in a space check.
85
86 disp_qos
87 This option controls whether you want blocking/lossless or non-
88 blocking/lossy communication between the audit daemon and the
89 dispatcher. There is a 128k buffer between the audit daemon and
90 dispatcher. This is good enough for most uses. If lossy is cho‐
91 sen, incoming events going to the dispatcher are discarded when
92 this queue is full. (Events are still written to disk if
93 log_format is not nolog.) Otherwise the auditd daemon will wait
94 for the queue to have an empty spot before logging to disk. The
95 risk is that while the daemon is waiting for network IO, an
96 event is not being recorded to disk. Valid values are: lossy and
97 lossless. Lossy is the default value.
98
99 dispatcher
100 The dispatcher is a program that is started by the audit daemon
101 when it starts up. It will pass a copy of all audit events to
102 that application's stdin. Make sure you trust the application
103 that you add to this line since it runs with root privileges.
104
105 name_format
106 This option controls how computer node names are inserted into
107 the audit event stream. It has the following choices: none,
108 hostname, fqd, numeric, and user. None means that no computer
109 name is inserted into the audit event. hostname is the name
110 returned by the gethostname syscall. The fqd means that it takes
111 the hostname and resolves it with dns for a fully qualified
112 domain name of that machine. Numeric is similar to fqd except
113 it resolves the IP address of the machine. In order to use this
114 option, you might want to test that 'hostname -i' or 'domainname
115 -i' returns a numeric address. Also, this option is not recom‐
116 mended if dhcp is used because you could have different
117 addresses over time for the same machine. User is an admin
118 defined string from the name option. The default value is none.
119
120 name This is the admin defined string that identifies the machine if
121 user is given as the name_format option.
122
123 max_log_file
124 This keyword specifies the maximum file size in megabytes. When
125 this limit is reached, it will trigger a configurable action.
126 The value given must be numeric.
127
128 max_log_file_action
129 This parameter tells the system what action to take when the
130 system has detected that the max file size limit has been
131 reached. Valid values are ignore, syslog, suspend, rotate and
132 keep_logs. If set to ignore, the audit daemon does nothing.
133 syslog means that it will issue a warning to syslog. suspend
134 will cause the audit daemon to stop writing records to the disk.
135 The daemon will still be alive. The rotate option will cause the
136 audit daemon to rotate the logs. It should be noted that logs
137 with higher numbers are older than logs with lower numbers. This
138 is the same convention used by the logrotate utility. The
139 keep_logs option is similar to rotate except it does not use the
140 num_logs setting. This prevents audit logs from being overwrit‐
141 ten. The effect is that logs accumulate and are not deleted -
142 which will trigger the space_left_action if the volume fills up.
143 This is best used in combination with an external script used to
144 archive logs on a periodic basis.
145
146 verify_email
147 This option determines if the email address given in
148 action_mail_acct is checked to see if the domain name can be
149 resolved. This option must be given before action_mail_acct or
150 the default value of yes will be used.
151
152 action_mail_acct
153 This option should contain a valid email address or alias. The
154 default address is root. If the email address is not local to
155 the machine, you must make sure you have email properly config‐
156 ured on your machine and network. Also, this option requires
157 that /usr/lib/sendmail exists on the machine.
158
159 space_left
160 This is a numeric value in megabytes that tells the audit daemon
161 when to perform a configurable action because the system is
162 starting to run low on disk space.
163
164 space_left_action
165 This parameter tells the system what action to take when the
166 system has detected that it is starting to get low on disk
167 space. Valid values are ignore, syslog, rotate, email, exec,
168 suspend, single, and halt. If set to ignore, the audit daemon
169 does nothing. syslog means that it will issue a warning to sys‐
170 log. rotate will rotate logs, losing the oldest to free up
171 space. Email means that it will send a warning to the email
172 account specified in action_mail_acct as well as sending the
173 message to syslog. exec /path-to-script will execute the
174 script. You cannot pass parameters to the script. The script is
175 also responsible for telling the auditd daemon to resume logging
176 once its completed its action. This can be done by adding ser‐
177 vice auditd resume to the script. suspend will cause the audit
178 daemon to stop writing records to the disk. The daemon will
179 still be alive. The single option will cause the audit daemon to
180 put the computer system in single user mode. The halt option
181 will cause the audit daemon to shutdown the computer system.
182
183 admin_space_left
184 This is a numeric value in megabytes that tells the audit daemon
185 when to perform a configurable action because the system is run‐
186 ning low on disk space. This should be considered the last
187 chance to do something before running out of disk space. The
188 numeric value for this parameter should be lower than the number
189 for space_left.
190
191 admin_space_left_action
192 This parameter tells the system what action to take when the
193 system has detected that it is low on disk space. Valid values
194 are ignore, syslog, rotate, email, exec, suspend, single, and
195 halt. If set to ignore, the audit daemon does nothing. Syslog
196 means that it will issue a warning to syslog. rotate will
197 rotate logs, losing the oldest to free up space. Email means
198 that it will send a warning to the email account specified in
199 action_mail_acct as well as sending the message to syslog. exec
200 /path-to-script will execute the script. You cannot pass parame‐
201 ters to the script. The script is also responsible for telling
202 the auditd daemon to resume logging once its completed its
203 action. This can be done by adding service auditd resume to the
204 script. Suspend will cause the audit daemon to stop writing
205 records to the disk. The daemon will still be alive. The single
206 option will cause the audit daemon to put the computer system in
207 single user mode. The halt option will cause the audit daemon to
208 shutdown the computer system.
209
210 disk_full_action
211 This parameter tells the system what action to take when the
212 system has detected that the partition to which log files are
213 written has become full. Valid values are ignore, syslog,
214 rotate, exec, suspend, single, and halt. If set to ignore, the
215 audit daemon will issue a syslog message but no other action is
216 taken. Syslog means that it will issue a warning to syslog.
217 rotate will rotate logs, losing the oldest to free up space.
218 exec /path-to-script will execute the script. You cannot pass
219 parameters to the script. The script is also responsible for
220 telling the auditd daemon to resume logging g once its completed
221 its action. This can be done by adding service auditd resume to
222 the script. Suspend will cause the audit daemon to stop writing
223 records to the disk. The daemon will still be alive. The single
224 option will cause the audit daemon to put the computer system in
225 single user mode. halt option will cause the audit daemon to
226 shutdown the computer system.
227
228 disk_error_action
229 This parameter tells the system what action to take whenever
230 there is an error detected when writing audit events to disk or
231 rotating logs. Valid values are ignore, syslog, exec, suspend,
232 single, and halt. If set to ignore, the audit daemon will not
233 take any action. Syslog means that it will issue no more than 5
234 consecutive warnings to syslog. exec /path-to-script will exe‐
235 cute the script. You cannot pass parameters to the script. Sus‐
236 pend will cause the audit daemon to stop writing records to the
237 disk. The daemon will still be alive. The single option will
238 cause the audit daemon to put the computer system in single user
239 mode. halt option will cause the audit daemon to shutdown the
240 computer system.
241
242 tcp_listen_port
243 This is a numeric value in the range 1..65535 which, if speci‐
244 fied, causes auditd to listen on the corresponding TCP port for
245 audit records from remote systems. The audit daemon may be
246 linked with tcp_wrappers. You may want to control access with an
247 entry in the hosts.allow and deny files. If this is deployed on
248 a systemd based OS, then you may need to adjust the 'After'
249 directive. See the note in the auditd.service file.
250
251 tcp_listen_queue
252 This is a numeric value which indicates how many pending
253 (requested but unaccepted) connections are allowed. The default
254 is 5. Setting this too small may cause connections to be
255 rejected if too many hosts start up at exactly the same time,
256 such as after a power failure.
257
258 tcp_max_per_addr
259 This is a numeric value which indicates how many concurrent con‐
260 nections from one IP address is allowed. The default is 1 and
261 the maximum is 1024. Setting this too large may allow for a
262 Denial of Service attack on the logging server. Also note that
263 the kernel has an internal maximum that will eventually prevent
264 this even if auditd allows it by config. The default should be
265 adequate in most cases unless a custom written recovery script
266 runs to forward unsent events. In this case you would increase
267 the number only large enough to let it in too.
268
269 use_libwrap
270 This setting determines whether or not to use tcp_wrappers to
271 discern connection attempts that are from allowed machines.
272 Legal values are either yes, or no The default value is yes.
273
274 tcp_client_ports
275 This parameter may be a single numeric value or two values sepa‐
276 rated by a dash (no spaces allowed). It indicates which client
277 ports are allowed for incoming connections. If not specified,
278 any port is allowed. Allowed values are 1..65535. For example,
279 to require the client use a priviledged port, specify 1-1023 for
280 this parameter. You will also need to set the local_port option
281 in the audisp-remote.conf file. Making sure that clients send
282 from a privileged port is a security feature to prevent log
283 injection attacks by untrusted users.
284
285 tcp_client_max_idle
286 This parameter indicates the number of seconds that a client may
287 be idle (i.e. no data from them at all) before auditd complains.
288 This is used to close inactive connections if the client machine
289 has a problem where it cannot shutdown the connection cleanly.
290 Note that this is a global setting, and must be higher than any
291 individual client heartbeat_timeout setting, preferably by a
292 factor of two. The default is zero, which disables this check.
293
294 enable_krb5
295 If set to "yes", Kerberos 5 will be used for authentication and
296 encryption. The default is "no".
297
298 krb5_principal
299 This is the principal for this server. The default is "auditd".
300 Given this default, the server will look for a key named like
301 auditd/hostname@EXAMPLE.COM stored in /etc/audit/audit.key to
302 authenticate itself, where hostname is the canonical name for
303 the server's host, as returned by a DNS lookup of its IP
304 address.
305
306 krb5_key_file
307 Location of the key for this client's principal. Note that the
308 key file must be owned by root and mode 0400. The default is
309 /etc/audit/audit.key
310
311 distribute_network
312 If set to "yes", network originating events will be distributed
313 to the audit dispatcher for processing. The default is "no".
314
315
317 In a CAPP environment, the audit trail is considered so important that
318 access to system resources must be denied if an audit trail cannot be
319 created. In this environment, it would be suggested that /var/log/audit
320 be on its own partition. This is to ensure that space detection is
321 accurate and that no other process comes along and consumes part of it.
322
323 The flush parameter should be set to sync or data.
324
325 Max_log_file and num_logs need to be adjusted so that you get complete
326 use of your partition. It should be noted that the more files that have
327 to be rotated, the longer it takes to get back to receiving audit
328 events. Max_log_file_action should be set to keep_logs.
329
330 Space_left should be set to a number that gives the admin enough time
331 to react to any alert message and perform some maintenance to free up
332 disk space. This would typically involve running the aureport -t report
333 and moving the oldest logs to an archive area. The value of space_left
334 is site dependent since the rate at which events are generated varies
335 with each deployment. The space_left_action is recommended to be set to
336 email. If you need something like an snmp trap, you can use the exec
337 option to send one.
338
339 Admin_space_left should be set to the amount of disk space on the audit
340 partition needed for admin actions to be recorded.
341 Admin_space_left_action would be set to single so that use of the
342 machine is restricted to just the console.
343
344 The disk_full_action is triggered when no more room exists on the par‐
345 tition. All access should be terminated since no more audit capability
346 exists. This can be set to either single or halt.
347
348 The disk_error_action should be set to syslog, single, or halt depend‐
349 ing on your local policies regarding handling of hardware malfunctions.
350
351 Specifying a single allowed client port may make it difficult for the
352 client to restart their audit subsystem, as it will be unable to recre‐
353 ate a connection with the same host addresses and ports until the con‐
354 nection closure TIME_WAIT state times out.
355
356
358 /etc/audit/auditd.conf
359 Audit daemon configuration file
360
361
363 auditd(8), audisp-remote.conf(5).
364
365
367 Steve Grubb
368
369
370
371Red Hat April 2016 AUDITD.CONF:(5)