OpenVPN Log seems to reset itself upon restarting the server

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
houmie75
OpenVPN Power User
Posts: 53
Joined: Wed Jul 22, 2020 7:46 pm

OpenVPN Log seems to reset itself upon restarting the server

Post by houmie75 » Mon May 03, 2021 9:10 am

Hello,

I was wondering why the vpn log overwrites itself when the server is restarted? All the history is gone after a restart.

server
port 1835
proto udp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt-v2 tls-crypt-v2.key
crl-verify crl.pem
ca ca.crt
cert server_mWwuFavu7MV6eH2D.crt
key server_mWwuFavu7MV6eH2D.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log
management localhost 1302
plugin /usr/lib/x86_64-linux-gnu/openvpn/plugins/openvpn-plugin-auth-pam.so ovpn-0
explicit-exit-notify 3
duplicate-cn

Thanks,

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 9018
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN Log seems to reset itself upon restarting the server

Post by TinCanTech » Mon May 03, 2021 4:34 pm

Use only --log-append not --log ..

I think there is something fishy about the --log directive, once invoked it cannot be undone.

FTR: This is documented in the manual.

Post Reply