Objective: Secure remote logging on syslog servers by encrypting it with TLS.
Syslog traffic can be encrypted using TLS/SSL, which provides mutual authentication between the remote server and the clients, thereby preventing man-in-the-middle attacks. The following steps show how to accomplish this.
Please ensure that:
Procedure:
Create a self-signed certificate )
Below are the steps to create a self-signed certificate with gnuTLS on the remote syslog server.
certtool --generate-privkey --outfile ca-key.pem
chmod 400 ca-key.pem
certtool --generate-self-signed --load-privkey ca-key.pem --outfile ca.pem
Fill in the details appropriately, when prompted. The Certificate Authority (CA) is now set up.
Generate machine certificate for every machine.
certtool --generate-privkey --outfile key.pem --bits 2048
certtool --generate-request --load-privkey key.pem --outfile request.pem
certtool --generate-certificate --load-request request.pem --outfile cert.pem --load-ca-certificate ca.pem --load-ca-privkey ca-key.pem
Fill in the details as necessary, when prompted.
Distributing the certificates
The following files need to be copied into all the server and client machines:
Create a directory on the root server to store these keys.
These files should be inaccessible to any user except the root user.
Configure the remote server to communicate over TCP using TLS certificates
module(load="imuxsock") # local messages
module(load="imtcp" # TCP listener
StreamDriver.Name="gtls"
StreamDriver.Mode="1" # run driver in TLS-only mode
StreamDriver.Authmode="anon"
)
# make gtls driver the default and set certificate files global(
DefaultNetstreamDriver="gtls"
DefaultNetstreamDriverCAFile="/path/to/contrib/gnutls/ca.pem"
DefaultNetstreamDriverCertFile="/path/to/contrib/gnutls/cert.pem"
DefaultNetstreamDriverKeyFile="/path/to/contrib/gnutls/key.pem"
)
# start up listener at port 6514
input( type="imtcp"
port="6514"
)
Configure the client machines so that they send logs only when the server identity is verified
global(
DefaultNetstreamDriver="gtls"
DefaultNetstreamDriverCAFile="/path/to/contrib/gnutls/ca.pem"
DefaultNetstreamDriverCertFile="/path/to/contrib/gnutls/cert.pem"
DefaultNetstreamDriverKeyFile="/path/to/contrib/gnutls/key.pem"
)
# set up the action for all messages action(
type="omfwd"
target="central.example.net"
protocol="tcp"
port="6514"
StreamDriver="gtls"
StreamDriverMode="1"
# run driver in TLS-only mode StreamDriverAuthMode="x509/name"
StreamDriverPermittedPeers="central.example.net"
)
This sets up your system for encrypted transmission of syslogs.
EventLog Analyzer, a comprehensive log management solution collects, analyzes, correlates, searches, and archives log data from devices across the network. The solution ensures security of log data while collection and transmission by employing different security protocols. Check out more about EventLog Analyzer here.
Interested in a
log management
solution?
Manage logs, comply with IT regulations, and mitigate security threats.
Our support technicians will get back to you at the earliest.
Zoho Corporation Pvt. Ltd. All rights reserved.