Enable OpenVPN Log and Add Timestamp in Log
1 min readApr 30, 2020
How to Configure OpenVPN 2.4.4 on Ubuntu 18.04.
1. Configure OpenVPN Configuration File
$ sudo bash
# vim /etc/openvpn/server/server.conf
log /var/log/openvpn.log
2. Enable OpenVPN Log Rotation
# vim /etc/logrotate.conf
/var/log/openvpn.log {
missingok
weekly
compress
rotate 8
}
3. Configure OpenVPN Launch File
# vim /etc/systemd/system/multi-user.target.wants/openvpn-server@server.service
# Removed "--suppress-timestamps" as the belowExecStart=/usr/sbin/openvpn --status %t/openvpn-server/status-%i.log --status-version 2 --config %i.conf
# systemctl daemon-reload
# systemctl restart openvpn-server@server.service