You can transfer logs from AppGate ZTNA appliances to an external SIEM system. By default, AppGate ZTNA uses Rsyslog for log transfer, which does not provide transport security on its own. You can secure the transmission by configuring both systems to use TLS.
Prerequisites
Before you begin, confirm the following:
The remote Rsyslog server runs Rsyslog version 8.16.0 or later.
The
rsyslog-gnutlsplugin is installed on the remote server.TLS certificates have been generated for the transport. For information on generating a CA, see Generating the machine certificate.
The remote Rsyslog server requires ca.pem, cert.pem, and key.pem. The AppGate ZTNA appliance requires only ca.pem. On the AppGate ZTNA appliance, the key must be stored in the /opt directory. The examples in this article use /opt/Keys on the AppGate ZTNA appliance and /home/ubuntu/Keys on the remote Rsyslog server. Create these directories before proceeding.
Configure the remote Rsyslog server
The following steps were tested on Ubuntu 16.04 with Rsyslog v8.16.0 and rsyslog-gnutls installed.
On the Rsyslog server, open etc/rsyslog.conf:
sudo nano /etc/rsyslog.confAdd the following lines:
# make gtls driver the default
$DefaultNetstreamDriver gtls
# certificate files
$DefaultNetstreamDriverCAFile /home/ubuntu/Keys/ca.pem
$DefaultNetstreamDriverCertFile /home/ubuntu/Keys/cert.pem
$DefaultNetstreamDriverKeyFile /home/ubuntu/Keys/key.pem
# load TCP listener
$ModLoad imtcp
# run driver in TLS-only mode
$InputTCPServerStreamDriverMode 1
# client is NOT authenticated
$InputTCPServerStreamDriverAuthMode anon
# start up listener at port 10514
$InputTCPServerRun 10514 Configure the AppGate ZTNA appliance
Create the
/opt/Keysdirectory on the appliance:
sudo mkdir /opt/Keys Copy
ca.peminto the/opt/Keysdirectory.In the admin UI, go to System > Appliances > Edit Appliance > Networking > Advanced > Rsyslog Destinations and select +Add.

In the Selector field, paste the following:
# certificate files - just CA for a client $DefaultNetstreamDriverCAFile /opt/Keys/ca.pem # set up the action $DefaultNetstreamDriver gtls # use gtls netstream driver $ActionSendStreamDriverMode 1 $ActionSendStreamDriverAuthMode anon # server is NOT authenticated :msg, contains, "[AUDIT]"NOTE
The last line
:msg, contains, "[AUDIT]"sends only logs marked with[AUDIT], which all audit logs include. Because audit logs and syslogs are stored in the same file, replace the last line with*.*to forward all logs.In the Template field, enter the following:
%msg:9:$%\nIn the Destination field, enter the destination of the remote Rsyslog server you are sending logs to:
@@(o)ec2-18-218-62-238.us-east-2.compute.amazonaws.com:10514This example sends logs to ec2-18-218-62-238.us-east-2.compute.amazonaws.com on port 10514.
Select Save at the bottom of the Edit Appliance page.
Confirm that port 10514 is open between the AppGate ZTNA appliance and the remote Rsyslog server.
After the configuration is saved, logs are forwarded to the remote server and stored in /var/log/syslog.
Verify the configuration
To confirm that logs are being sent, use one of the following methods:
Check
/var/log/syslogon the remote Rsyslog server and confirm that logs are being written.Run a
tcpdumpon the remote Rsyslog server:
sudo tcpdump -i <interface> port 10514For more information about logs, see Audit logs. For information about audit log record details, see Audit log detail.