Page 1 of 1

OpenVPN Log seems to reset itself upon restarting the server

Posted: Mon May 03, 2021 9:10 am
by houmie75
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,

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

Posted: Mon May 03, 2021 4:34 pm
by TinCanTech
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.