Page 1 of 1
How to Delete Session Logs
Posted: Sun Mar 01, 2020 1:37 pm
by Nemlakufye
I tried to delete openvpnas.log but did not work. How can I do it?
Re: How to Delete Session Logs
Posted: Sun Mar 01, 2020 1:48 pm
by Pippin
Re: How to Delete Session Logs
Posted: Thu Aug 26, 2021 7:04 pm
by sandmanfvr
I used this link, this doesn't help me. Stopping the service, removing the log file, then starting generates a new one BUT it still has all the data in it! Where is this log data coming from? Why is it still repopulating the log file? I want it cleared for good. I also found the link below and added the 3 lines into my config file and it still collects logs. I want no logging and this log cleared, how can i do that? Thanks.
https://community.nomadgate.com/t/disab ... ient/20589
Re: How to Delete Session Logs
Posted: Thu Aug 26, 2021 9:12 pm
by openvpn_inc
Hello sandmanvfr,
If you're using OpenVPN Access Server there are 2 levels of logs. There's /var/log/openvpnas.log that records all sorts of activities of OpenVPN Access Server and the OpenVPN daemons, this is usually for diagnostic purposes. You can redirect this one to /dev/null if you wanted to. The other is a log database that contains more consumable information like how long a person was connected, who it was, how much bandwidth was used, and so on. That one can be wiped with:
sudo /usr/local/openvpn_as/scripts/logdba --wipe
Kind regards,
Johan
Re: How to Delete Session Logs
Posted: Fri Aug 27, 2021 1:26 pm
by sandmanfvr
Johan, THANKS! I took this and cleared the log and then made a cron job for every 5 minutes. Works fine.