# UBUNTU

## To forward Audit logs &#x20;

Install syslog package, if you haven’t installed it by executing the below command:&#x20;

`apt-get install rsyslog`&#x20;

Open the 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;

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

$ `vim /etc/audit/auditd.conf`&#x20;

log\_group = syslog&#x20;

Save & Quit the configuration file.&#x20;

Restart auditd service to reflect the changes.&#x20;

`$ /etc/init.d/auditd restart`&#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><code><strong>$InputFilePersistStateInterval 1
</strong></code></pre>

`$InputRunFileMonitor`&#x20;

`local6.* @<LogCollector-IP>:514`&#x20;

Save and Quit the configuration file.&#x20;

Restart rsyslog service&#x20;

`service rsyslog restart`&#x20;
