Using Syslog to Send Logs from a Linux System
General InformationSyslog is an industry-standard message logging protocol that is used on many devices and platforms. It provides a mechanism for network devices to send event messages to a logging server, also known as a syslog server. In this case, a USM Anywhere Sensor is acting as the syslog server. USM Anywhere supports both the BSD syslog protocol (RFC 3164) and the syslog protocol (RFC 5424). For RFC 3164, USM Anywhere listens for syslog over UDP on port 514, TCP on port 601, or Transport Layer Security (TLS) on port 6514. For RFC 5424, USM Anywhere listens for syslog over TCP on port 602 or TLS on port 6515. For example, a router might send messages about users logging on to console sessions, while a web server might log access-denied events. Follow the procedure that corresponds to the Linux distribution you use.Fedora Linux Distribution
Fedora Linux Distribution
You must have sudo privileges to complete this procedure.To send logs from Fedora Linux using syslog
-
On your Linux machine, open /etc/rsyslog.conf and add the following line:
-
Restart rsyslog:
Red Hat Enterprise Linux Distribution
Red Hat Enterprise Linux Distribution
You must have privileges to complete this procedure.To send logs from Red Hat Enterprise Linux using syslog
-
On your Linux machine, install rsyslog for RHEL-5 (installed by default for RHEL-6 and 7):
-
Open /etc/rsyslog.conf and add the following line to the start of the file:
Where <IP> is the IP address for the USM Anywhere Sensor.
-
Restart rsyslog:
openSUSE Distributions
openSUSE Distributions
You must have privileges to complete this procedure.To send logs from openSUSE Distributions
-
Install rsyslogd:
-
Set rsyslog as syslog server:
a. Open /etc/sysconfig/syslog.
b. Add the following lines:
c. Save it and run SuSEconfig.
-
On your Linux machine, open /etc/rsyslog.d/remote.conf and add the following line:
Where <IP> is the IP address for the USM Anywhere Sensor.
-
Restart rsyslog:
Debian GNU/Linux and Ubuntu Distributions
Debian GNU/Linux and Ubuntu Distributions
You must have privileges to complete this procedure.To send logs from Debian GNU/Linux and Ubuntu Distributions
-
On your Linux machine, open the appropriate configuration file:
- (debian)
/etc/rsyslog.conf
- (ubuntu)
/etc/rsyslog.d/50-default.conf
- (debian)
-
Add one of these lines:
- (UDP)
*.* action(type="omfwd" target="<IP>" port="514" protocol="udp" action.resumeRetryCount="100" queue.type="linkedList" queue.size="10000")
- (TCP)
*.* action(type="omfwd" target="<IP>" port="601" protocol="tcp" action.resumeRetryCount="100" queue.type="linkedList" queue.size="10000")
- (UDP)
-
Restart rsyslog:
sudo service rsyslog restart
SUSE Linux Enterprise 11 SP4 - 12 SP1Server Distribution
SUSE Linux Enterprise 11 SP4 - 12 SP1Server Distribution
You must have privileges to complete this procedure.To send logs from SUSE Linux Enterprise Server Distribution
-
Install the rsyslogd package:
-
Set rsyslog as syslog server by editing the following parameters in
/etc/sysconfig/syslog
: - Save the file and run SuSEconfig.
-
On your Linux machine, open rsyslog.d/remote.conf and add the following line:
-
Restart rsyslog:
Solaris Distribution
Solaris Distribution
You must have privileges to complete this procedure.To send logs from Solaris distributions
-
On your Linux machine, open
/etc/syslog.conf
and add the following line:Important: In the foregoing command, you must tab from auth.notice to@<USM-Anwhere-Sensor-IP-address>
; if you type a space the command will fail. -
Stop, then restart syslog:
Solaris 5.9 and earlier
Solaris 5.10 and above
FreeBSD Distributions
FreeBSD Distributions
You must have privileges to complete this procedure.To send logs from FreeBSD Distributions
-
On your Linux machine, open /etc/syslog.conf and add the following line:
-
Restart rsyslog:
Gentoo Distributions
Gentoo Distributions
You must have privileges to complete this procedure.To send logs from Gentoo Distribution
-
On your Linux machine, open /etc/rsyslog.conf and add the following line:
-
Restart rsyslog:
Arch Linux Distribution
Arch Linux Distribution
You must have privileges to complete this procedure.To send logs from Arch Distribution
-
On your Linux machine, open /etc/syslog-ng/syslog-ng.conf and add the following line:
-
Restart rsyslog: