Repository navigation
Expand file tree
/
Copy pathtls-production.conf
More file actions
51 lines (39 loc) · 1.84 KB
/
Copy pathtls-production.conf
File metadata and controls
51 lines (39 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Production-Ready TLS Configuration
# Recommended settings for production environments
# Features: Strict certificate validation, connection persistence, retry logic
[Network]
# Remote syslog server (replace with your actual server)
Address=logs.prod.example.com:6514
# TLS protocol for encryption
Protocol=tls
# RFC 5425 format (length-prefixed for TLS, prevents message truncation)
LogFormat=rfc5425
# STRICT certificate validation (reject any invalid certificates)
# Never use 'warn' or 'allow' in production!
TLSCertificateAuthMode=deny
# Path to CA certificate bundle
# Debian/Ubuntu: /etc/ssl/certs/ca-certificates.crt
# RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt
# Alpine: /etc/ssl/certs/ca-certificates.crt
TLSServerCertificate=/etc/pki/tls/certs/ca-bundle.crt
# TCP connection optimizations
KeepAlive=yes # Detect broken connections
NoDelay=yes # Disable Nagle's algorithm for low latency
# Retry connection every 30 seconds if it fails
ConnectionRetrySec=30
# Filter out noisy debug and info messages to reduce volume
ExcludeSyslogLevel=debug info
# Exclude authentication logs (may contain sensitive credentials)
ExcludeSyslogFacility=auth authpriv
# Add production metadata to all messages
StructuredData=[origin@32473 environment="production" version="1.4"]
# Optional: Only forward logs from specific journal namespace
# Namespace=production
# Validation checklist before deploying:
# [ ] Replace logs.prod.example.com with your actual server
# [ ] Verify TLSServerCertificate path is correct for your OS
# [ ] Test certificate validation: openssl s_client -connect logs.prod.example.com:6514
# [ ] Confirm firewall allows outbound connections to port 6514
# [ ] Set up monitoring for systemd-netlogd service health
# [ ] Configure alerts for certificate expiration
# [ ] Test failover if your logging infrastructure supports it