Stop OpenVPN from creating ANY log files

How to customize and extend your OpenVPN installation.
Post Reply
Random
OpenVpn Newbie
Posts: 4
Joined: Tue Oct 20, 2020 6:13 am

Stop OpenVPN from creating ANY log files

Post by Random » Tue Oct 20, 2020 6:20 am

Hello,

How do I stop OpenVPN from creating any log files at all?

I have searched and found some suggestions for config file arguments that limit the logging but each time a connection is made the log file is still generated and I have not found a solution that stops log files from being created all together.

Thanks in advance.

Random
OpenVpn Newbie
Posts: 4
Joined: Tue Oct 20, 2020 6:13 am

Re: Stop OpenVPN from creating ANY log files

Post by Random » Wed Oct 21, 2020 5:15 am

No one knows???

Random
OpenVpn Newbie
Posts: 4
Joined: Tue Oct 20, 2020 6:13 am

Re: Stop OpenVPN from creating ANY log files

Post by Random » Thu Oct 22, 2020 10:44 am

???????????????

Random
OpenVpn Newbie
Posts: 4
Joined: Tue Oct 20, 2020 6:13 am

Re: Stop OpenVPN from creating ANY log files

Post by Random » Fri Oct 23, 2020 10:52 am

I see that this forum sure is useful...

openvpn@iment.com
OpenVpn Newbie
Posts: 1
Joined: Tue Dec 08, 2020 12:39 am

Re: Stop OpenVPN from creating ANY log files

Post by openvpn@iment.com » Tue Dec 08, 2020 1:10 am

I haven't tried this myself, but adding the following line to the config file should work.

log /dev/null

This option can also be used on the command line that starts openvpn (as long as it is prefixed by two dashes, as in "--log /dev/null").

Also, any left-over "log-append" option(s) should be replaced by the simple "log" option.

Note that openvpn must be restarted for logging to be stopped. (The older log files will not automatically be erased.)

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

Re: Stop OpenVPN from creating ANY log files

Post by TinCanTech » Tue Dec 08, 2020 1:43 am

Random wrote:
Tue Oct 20, 2020 6:20 am
How do I stop OpenVPN from creating any log files at all?
openvpn@iment.com wrote:
Tue Dec 08, 2020 1:10 am
I haven't tried this myself, but adding the following line to the config file should work.

log /dev/null
This only redirects the log file (on *nix) but it does not stop it being generated.

Post Reply