I needed a centralized logging server to consolidate all server logs. To streamline and ease the process of installation, configuration, and documentation, I decided to use Ubuntu Server 12.04 LTS; as it is what most of our non-Windows based systems are running on currently.<\/p>\n
While this How-To is written specifically for Ubuntu Server 12.04 LTS, the following steps may be used to successfully configure a Syslog Server on other Linux/Unix based systems.<\/p>\n
Install and configure Ubuntu Server 12.04 LTS.<\/p>\n<\/div>\n
Use your favorite editor to make the following changes to the rsyslog.conf file(I prefer vim):<\/p>\n
sudo vim /etc/rsyslog.conf<\/p>\n
Uncomment the following lines:<\/p>\n
$ModLoad imudp
\n$UDPServerRun 514<\/p>\n
At the bottom of the file include the following entry:<\/p>\n
$template TmplAuth,<\/p>\n
“/var/log/%HOSTNAME%/%PROGRAMNAME%.log”<\/p>\n<\/div>\n
Change the permissions of the /var/log directory to allow syslog the ability create/change sub-directories and files.<\/p>\n
cd /var && sudo chown syslog:syslog log<\/p>\n<\/div>\n
Save the changes made to the rsyslog.conf file and restart the rsyslog service.<\/p>\n
sudo service rsyslog restart<\/p>\n<\/div>\n
For all *nix-based clients you will need to edit the rsyslog.conf file or syslog.conf file and add the following line(x.x.x.x being the ip address of your syslog server):<\/p>\n
Ubuntu/Debian:
\nsudo vim /etc/rsyslog.conf<\/p>\n
.<\/em> @x.x.x.x<\/span><\/p>\n CentOS/Fedora/RHEL: .<\/em> @x.x.x.x<\/span><\/p>\n FreeBSD/BSD variants: Uncomment the following line: Ubuntu/Debian: CentOS/Fedora/RHEL: FreeBSD/BSD variants: On your Syslog server check the “/var/log” directory to see if client log directories have been created.<\/p>\n cd /var/log && ls<\/p>\n<\/div>\n Unfortunately, Windows-based systems do not natively play nice with Syslog servers. However, you can install an agent-based service called “Snare” to manage and export log files to your Syslog server.<\/p>\n SNARE: Snare Lite (SIEM & Logging Software) download | SourceForge.net<\/a><\/p>\n
\nsudo vim /etc/syslog.conf<\/p>\n
\nsudo vim /etc/syslog.conf<\/p>\n
\n.<\/em> @logserver<\/span> (replace “logserver” with x.x.x.x)<\/p>\n<\/div>\n<\/a>Step 6: Restart the rsyslog/syslog service on newly configured client<\/h3>\n
\nsudo service rsyslog restart<\/p>\n
\nsudo /etc/init.d/syslog restart<\/p>\n
\nsudo /etc/rc.d/syslog restart<\/p>\n<\/div>\n<\/a>Step 7: Verify logs are being sent to your syslog server<\/h3>\n
<\/a>Step 8: (Optional Step) Configure Windows-based clients<\/h3>\n