0

再会,

我有带有 syslog-ng (syslog-ng-1.6.8-20.23.1) 的 SLES 10,我无法获得正确的配置,因此文件 /var/log/audit/audit.log 被发送到远程 syslog 服务器。

我使用了 tcpdump,我可以在发送到远程服务器的数据包中看到一些详细信息,但是我在 tcp 数据包中没有看到任何具有审计格式的内容。

filter f_audit   { facility(13); };
filter f_audit2 {facility(security);};

destination d_local_facility {
  file("/var/log/$FACILITY/$FACILITY.log");


destination d_remote_loghost { tcp("$hostname" port(514)); };

log {
  source(s_local);
    destination(d_remote_loghost5);

};

我究竟做错了什么?

4

2 回答 2

1

您必须在读取 /var/log/audit/audit.log 文件的 syslog-ng 中配置文件源,并将此源包含在日志语句中。我在你的配置文件中看不到。

顺便说一句,syslog-ng 1.6 版已经过时了。syslog-ng 3.7 可以解析 auditd 日志以提取信息,因此您可能需要升级。您可以在https://syslog-ng.org/3rd-party-binaries/找到一些 syslog-ng 的 SLES 包

于 2016-08-15T15:28:57.630 回答
0

在 SLES 10 中,我终于在启动时使用了一个脚本。after.local 文件相当于 rc.local

因此,在 /etc/init.d/after.local 中:

nohup /usr/bin/tailf /var/log/audit/audit.log | /bin/logger -t audispd -p local6.info &

在 SLES 11 中它更容易,因为存在 auditspd 调度程序。

于 2016-08-29T17:27:46.563 回答