On Wed, 15 Jun 2022 22:58:46 +0200, David Sommerseth
<open...@sf.lists.topphemmelig.net> wrote:

>So in other words: On a systemd enabled system, using the "log" option 
>is not optimal.

Does this mean that I should completely remove the log entries in the conf files
or somehow use some specific entry that stops it from logging?

>Generally speaking, on systemd enabled systems you have the journalctl 
>which is the main interface to read log entries.  The basic output looks 
>quite similar to any common log file.  But you can also use the '-o' 
>output to get far more details, including better machine readable outputs.
>....

Thanks for this advice, I did not know that all this could be done with
journalctl!
I have to expand my notes to encompass this too.

But will journalctl work independently of the openvpn log option settings, like
verbosity etc?
I have this now in the two instance conf files:

log /etc/openvpn/log/openvpn.log
verb 4
mute 10

and:

log /etc/openvpn/log/ovpn_local.log
verb 4
mute 10


>And a final note in regards to the systemd unit files.  Please 
>disable/mask the use of openvpn@*.service and openvpn.service unit 
>files.  When you only use the openvpn-client@.service and
>openvpn-server@.client, you will have an environment which will be 
>easier to debug and troubleshoot.  I mention this as I saw the 
>"openvpn@server.service" unit was listed as "failed".
>
>

This system was created back in 2016 or thereabouts on an Ubuntu Server system
and has been migrated through the Ubuntu versions since then. Now at Ubuntu
20.04.4 LTS.

So the way of launching the service has also changed ove the years, I only a few
months back moved to using the /etc/openvpn/server and /etc/openvpn/client
directories to store the conf files and modified the startup etc to suit the new
way of operation.

The way I did that:

1) sudo systemctl stop openvpn
   sudo systemctl stop openvpn@server.service
   sudo systemctl stop openvpn@serverlocal.service
2) sudo systemctl disable openvpn@server.service
   sudo systemctl disable openvpn@serverlocal.service
   sudo systemctl disable openvpn.service
3) Edit /etc/default/openvpn and comment out the AUTOSTART line
4) sudo mkdir /etc/openvpn/client
   sudo mkdir /etc/openvpn/server
5) sudo mv /etc/openvpn/server*.conf /etc/openvpn/server/
6) sudo systemctl enable --now openvpn-server@server
   sudo systemctl enable --now openvpn-server@serverlocal

It seemed to work, but you might have spotted a flaw in this migration, so
please advice how to actually disable/mask the offending services.



-- 
Bo Berglund
Developer in Sweden



_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to