On 18/01/2022 15:21, Bo Berglund wrote:
On Tue, 18 Jan 2022 10:58:02 +0100, David Sommerseth
<open...@sf.lists.topphemmelig.net> wrote:

On 17/01/2022 23:37, Bo Berglund wrote:
[..snip...]
I have two server instances running with and without Internet routing from conf
files server.conf and serverlocal.conf.
I want to change them to the new handling.

So to switch over I assume could do as follows:

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

Would this be all that is needed?

This looks reasonable.  You can combine the enable/start operations in
one go, for simplicity:

     systemctl enable --now openvpn-server@server

The '--now' argument will run the 'start' command for you.

Or is there some other cleanup I need to perform in order to get it done
properly?
Some other service I need to stop?

Yes, you need to ensure that 'openvpn.service' and any
'openvpn@*.service' have been stopped.  This is easy to check by running:

    systemctl status openvpn.service openvpn@*.service


You can also ensure they are all stopped and disabled in a similar way
as enabling services:

    systemctl disable --now openvpn.service openvpn@*.service

OK, so I have now run through the commands I listed.

After all is said and done I now have this (and the client connects fine):

sudo systemctl | grep openvpn
   openvpn-server@server.service       loaded active running  OpenVPN service 
for
server
   openvpn-server@serverlocal.service  loaded active running  OpenVPN service 
for
serverlocal
   system-openvpn.slice                loaded active active
system-openvpn.slice
   system-openvpn\x2dserver.slice      loaded active active
system-openvpn\x2dserver.slice

What are these *.slice items???

The best answer is found in:

    man 5 systemd.slice

There is a lot of man pages for systemd, and it is all kept up-to-date and answers almost everything you need to know about managing a system with systemd.


--
kind regards,

David Sommerseth
OpenVPN Inc



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

Reply via email to