# CENTOS-RHEL

To forward Audit logs &#x20;

Install syslog package, if you haven’t installed it&#x20;

`yum -y install rsyslog`&#x20;

Checking the rsyslog.conf&#x20;

Open a rsyslog.conf file located at /etc/rsyslog.conf by following command&#x20;

`#vim/etc/rsyslog.conf`&#x20;

At the end of the file check for the following line and uncomment&#x20;

`$IncludeConfig /etc/rsyslog.d/*.conf`&#x20;

`# Include all config files in /etc/rsyslog.d/`&#x20;

`$IncludeConfig /etc/rsyslog.d/*.conf`&#x20;

Save and Quit the configuration file.&#x20;

Create log configuration for Audit logs with vim /etc/rsyslog.d/auditlog.conf and paste following lines below&#x20;

`$ModLoad imfile`&#x20;

`# auditd audit.log`&#x20;

`$InputFileName /var/log/audit/audit.log ##path of log file`&#x20;

`$InputFileTag tag_audit_log:`&#x20;

`$InputFileStateFile audit_log`&#x20;

`$InputFileSeverity info`&#x20;

`$InputFileFacility local6`&#x20;

```
$InputFilePollInterval 1
```

<pre class="language-shellscript"><code class="lang-shellscript"><strong>$InputFilePersistStateInterval 1
</strong></code></pre>

`$InputRunFileMonitor`&#x20;

`$WorkDirectory /var/lib/rsyslog`&#x20;

`$ActionQueueFileName fwdRule1 # unique name prefix for spool files`&#x20;

`$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)`&#x20;

`$ActionQueueSaveOnShutdown on # save messages to disk on shutdown`&#x20;

`$ActionQueueType LinkedList # run asynchronously`&#x20;

`$ActionResumeRetryCount -1`&#x20;

`local6.* @<Log Collector IP>:514`&#x20;

Save and Quit the configuration file.&#x20;

Restart rsyslog service&#x20;

`service rsyslog restart`&#x20;
