How to Delete Session Logs

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
Nemlakufye
OpenVpn Newbie
Posts: 13
Joined: Sat Feb 29, 2020 2:57 pm

How to Delete Session Logs

Post by Nemlakufye » Sun Mar 01, 2020 1:37 pm

I tried to delete openvpnas.log but did not work. How can I do it?

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: How to Delete Session Logs

Post by Pippin » Sun Mar 01, 2020 1:48 pm

I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

sandmanfvr
OpenVpn Newbie
Posts: 2
Joined: Thu Aug 26, 2021 6:53 pm

Re: How to Delete Session Logs

Post by sandmanfvr » Thu Aug 26, 2021 7:04 pm

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

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: How to Delete Session Logs

Post by openvpn_inc » Thu Aug 26, 2021 9:12 pm

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
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

sandmanfvr
OpenVpn Newbie
Posts: 2
Joined: Thu Aug 26, 2021 6:53 pm

Re: How to Delete Session Logs

Post by sandmanfvr » Fri Aug 27, 2021 1:26 pm

Johan, THANKS! I took this and cleared the log and then made a cron job for every 5 minutes. Works fine.

Post Reply