The syslog-ng application can encrypt incoming and outgoing syslog message flows using TLS if you use the network()
or syslog()
drivers.
|
NOTE:
The format of the TLS connections used by syslog-ng is similar to using syslog-ng and stunnel, but the source IP information is not lost. |
To encrypt connections, use the transport("tls")
and tls()
options in the source and destination statements.
The tls() option can include the following settings:
Accepted values: | yes | no |
Default: | no |
Description: Enable on-the-wire compression in TLS communication. Note that this option must be enabled both on the server and the client side to have any effect. Enabling compression can significantly reduce the bandwidth required to transport the messages, but can slightly decrease the performance of syslog-ng PE, reducing the number of transferred messages during a given period.
Accepted values: | Directory name |
Default: | none |
Description: Name of a directory, that contains a set of trusted CA certificates in PEM format. The CA certificate files have to be named after the 32-bit hash of the subject's name. This naming can be created using the c_rehash utility in openssl.
Accepted values: | sha1-based |
Default: | sha1-based |
Description: The type of the hash used for the CA certificates. NOTE: This option is deprecated.
|
Caution:
If you are upgrading to syslog-ng PE version 6.x from a version earlier than 5.0, you must rehash the trusted CA certificates. |
Accepted values: | Filename |
Default: | none |
Description: Name of a file, that contains an X.509 certificate (or a certificate chain) in PEM format, suitable as a TLS certificate, matching the private key. If the file contains a certificate chain, the file must begin with the certificate of the host, followed by the CA certificate that signed the certificate of the host, and any other signing CAs in order.
cipher-suite()
Accepted values: | Name of a cipher, or a colon-separated list |
Default: | 1.1.1 |
Description: Specifies the cipher, hash, and key-exchange algorithms used for the encryption, for example, ECDHE-ECDSA-AES256-SHA384. The list of available algorithms depends on the version of OpenSSL used to compile syslog-ng PE. To specify multiple ciphers, separate the cipher names with a colon, and enclose the list between double-quotes, for example:
cipher-suite("ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384")
Accepted values: | Directory name |
Default: | none |
Description: Name of a directory that contains the Certificate Revocation Lists for trusted CAs. Similarly to ca-dir()
files, use the 32-bit hash of the name of the issuing CAs as filenames. The extension of the files must be .r0
.
If the crl-dir()
is set, and the peer certificate has been revoked, syslog-ng PE rejects the connection. If the peer certificate has not been revoked, or syslog-ng PE cannot access the CRL, syslog-ng PE accepts the connection.
Accepted values: | string (colon-separated list) |
Default: | none |
Description: A colon-separated list that specifies the curves that are permitted in the connection when using Elliptic Curve Cryptography (ECC). The syslog-ng PE application uses automatically the highest preference curve that both peers support. If not specified, the list includes every supported curve. For example:
curve-list('prime256v1:secp521r1')
The syslog-ng Premium Edition application currently supports the following curves: sect163k1
, sect163r1
, sect163r2
, sect193r1
, sect193r2,
, sect233k1
, sect233r1
, sect239k1
, sect283k1
, sect283r1,
, sect409k1
, sect409r1
, sect571k1
, sect571r1
, secp160k1,
, secp160r1
, secp160r2
, secp192k1
, prime192v1
, secp224k1,
, secp224r1
, secp256k1
, prime256v1
, secp384r1
, secp521r1,
, brainpoolP256r1
, brainpoolP384r1
, brainpoolP512r1
.
Accepted values: | string (filename) |
Default: | none |
Description: Specifies a file containing Diffie-Hellman parameters, generated using the openssl dhparam utility. Note that syslog-ng PE supports only DH parameter files in the PEM format. If you do not set this parameter, syslog-ng PE uses the 2048-bit MODP Group, as described in RFC 3526.
Accepted values: | Filename |
Default: | none |
Description: Name of a file, that contains an unencrypted private key in PEM format, suitable as a TLS key.
Accepted values: | optional-trusted | optional-untrusted | required-trusted | required-untrusted |
Default: | required-trusted |
Description: Verification method of the peer, the four possible values is a combination of two properties of validation:
-
whether the peer is required to provide a certificate (required or optional prefix), and
-
whether the certificate provided needs to be valid or not.
The following table summarizes the possible options and their results depending on the certificate of the peer.
The remote peer has: | ||||
---|---|---|---|---|
no certificate | invalid certificate | valid certificate | ||
Local peer-verify() setting | optional-untrusted | TLS-encryption | TLS-encryption | TLS-encryption |
optional-trusted | TLS-encryption | rejected connection | TLS-encryption | |
required-untrusted | rejected connection | TLS-encryption | TLS-encryption | |
required-trusted | rejected connection | rejected connection | TLS-encryption |
For untrusted certificates only the existence of the certificate is checked, but it does not have to be valid — syslog-ng accepts the certificate even if it is expired, signed by an unknown CA, or its CN and the name of the machine mismatches.
|
Caution:
When validating a certificate, the entire certificate chain must be valid, including the CA certificate. If any certificate of the chain is invalid, syslog-ng PE will reject the connection. |
Accepted values: | list of accepted distinguished names |
Default: | none |
Description: To accept connections only from hosts using certain certificates signed by the trusted CAs, list the distinguished names of the accepted certificates in this parameter. For example using trusted-dn("*, O=Example Inc, ST=Some-State, C=*")
will accept only certificates issued for the Example Inc
organization in Some-State
state.
Accepted values: | list of accepted SHA-1 fingerprints |
Default: | none |
Description: To accept connections only from hosts using certain certificates having specific SHA-1 fingerprints, list the fingerprints of the accepted certificates in this parameter. For example trusted-keys("SHA1:00:EF:ED:A4:CE:00:D1:14:A4:AB:43:00:EF:00:91:85:FF:89:28:8F", "SHA1:0C:42:00:3E:B2:60:36:64:00:E2:83:F0:80:46:AD:00:A8:9D:00:15")
.
To find the fingerprint of a certificate, you can use the following command: openssl x509 -in <certificate-filename> -sha1 -noout -fingerprint
|
NOTE:
When using the
|