I am trying to configure a CentOS 7 running in VirtualBox to send its audit logs to the host which is FreeBSD 10.3. Ideally, I'd like to receive the logs with FreeBSD's auditdistd(8)
but for now I'd just like to be able to use netcat for that.
My problem is that netcat doesn't get any data.
Details
- When I run
service auditd status
I get the following results:
Redirecting to /bin/systemctl status auditd.service auditd.service - Security Auditing Service Loaded: loaded (/usr/lib/systemd/system/auditd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2016-08-19 11:35:42 CEST; 3s ago Process: 2216 ExecStartPost=/sbin/augenrules --load (code=exited, status=1/FAILURE) Main PID: 2215 (auditd) CGroup: /system.slice/auditd.service ├─2215 /sbin/auditd -n └─2218 /sbin/audispd Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote was restarted Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote terminated unexpectedly Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote was restarted Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote terminated unexpectedly Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote was restarted Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote terminated unexpectedly Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote was restarted Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote terminated unexpectedly Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote has exceeded max_restarts Aug 19 11:35:42 hephaistos audispd[2218]: plugin /sbin/audisp-remote was restarted
Setup
Network Setup
- CentOS and FreeBSD are connected on a host-only network. I've assigned them the following IP's:
- CentOS: 192.168.56.101
- FreeBSD: 192.168.56.1
FreeBSD Setup
I've got netcat listening on port 60:
nc -lk 60
The connection works. I can use nc 192.168.56.1 60
on CentOS to send data to FreeBSD.
CentOS Setup
The kernel version is:
4.7.0-1.el7.elrepo.x86_64 #1 SMP Sun Jul 24 18:15:29 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
.The version of Linux Audit userspace is 2.6.6.
auditd is running and actively logging to
/var/log/audit.log
.The auditing rules in
/etc/audit/rules.d/
are well configured.The configuration of
/etc/audisp/audisp-remote.conf
looks like this:remote-server = 192.168.56.1 port = 60 local_port = any transport = tcp mode = immediate
I've got two default files in
/etc/audisp/plugins.d/
:syslog.conf
andaf_unix.conf
and both of them are not active. I've addedaf-remote.conf
and it looks like this:# This file controls the audispd data path to the # remote event logger. This plugin will send events to # a remote machine (Central Logger). active = yes direction = out path = /sbin/audisp-remote type = always #args = format = string
It is a modified example from the official repository (link).
Here's the content of
/etc/audisp/audispd.conf
:q_depth = 150 overflow_action = SYSLOG priority_boost = 4 max_restarts = 10 name_format = HOSTNAME
I'll be happy to provide more details if needed.