You are not logged in.

#1 2024-12-23 14:42:36

jeoz
Member
Registered: 2024-12-23
Posts: 6

[solved] openvpn missing systemd support

Following various guides, including Arch Linux, to setup a vpn server.
The instructions all advise to enable and start the openvpn service. Yet on a new Arch Linux install no systemd config is available.
Searching I found a suggestion to confirm if systemd support is enabled by running "openvpn --version" and checking for "enable-systemd=yes" in the output.
On my installation the output of the above comand display the following:

OpenVPN 2.6.12 [git:makepkg/038a94bae57a446c+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] [DCO] built on Dec 16 2024
library versions: OpenSSL 3.4.0 22 Oct 2024, LZO 2.10
DCO version: N/A
Originally developed by James Yonan
Copyright (C) 2002-2024 OpenVPN Inc <sales@openvpn.net>
Compile time defines: 

Does the above confirm that systemd support for openvpn is no longer enabled in Arch Linux, or am I missing something ?

 extra/openvpn 2.6.12-2 [installed] 

Last edited by jeoz (2024-12-24 13:12:56)

Offline

#2 2024-12-23 14:44:30

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: [solved] openvpn missing systemd support


Jin, Jîyan, Azadî

Offline

#3 2024-12-23 16:40:58

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [solved] openvpn missing systemd support

jeoz wrote:

Following various guides, including Arch Linux, to setup a vpn server.

I tried it (out of curiosity)  and it works.

So what exactly did you do and what exactly fails?

Offline

#4 2024-12-23 23:57:48

jeoz
Member
Registered: 2024-12-23
Posts: 6

Re: [solved] openvpn missing systemd support

Thank you for pointing that out. Just no-idea how to translate that to the output of --version option. Things like DCO seems obvious and clear, systemd ... no idea.

Offline

#5 2024-12-24 00:09:30

jeoz
Member
Registered: 2024-12-23
Posts: 6

Re: [solved] openvpn missing systemd support

-thc wrote:
jeoz wrote:

Following various guides, including Arch Linux, to setup a vpn server.

I tried it (out of curiosity)  and it works.

So what exactly did you do and what exactly fails?

I just checked on a second installation and I can see the openvpn service using systemctl. openvpn --version also have exactly the same output.

What I did:

1. installed openvpn, openssl, easy-rsa
2. create CA, server certs, client certs copy to where needed
3. updated server.conf
4. set net.ipv4.ip_forward=1
5. start openvpn (cli to test) .. it works
6. enable openvpn systemd service <=. fail, does not exits.

I know I can create one, but I'm concerned if it is missing in the first place.

Offline

#6 2024-12-24 00:55:10

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,193
Website

Re: [solved] openvpn missing systemd support

ls /usr/lib/systemd/system/openvpn-server@.service
pacman -Qkk openvpn

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2024-12-24 02:18:02

jeoz
Member
Registered: 2024-12-23
Posts: 6

Re: [solved] openvpn missing systemd support

/usr/lib/systemd/system/openvpn-server@.service exist.

Am I mistaken in beleiving systemctl --all list-units should list it if in /usr/lib/systemd/system/ ?


# pacman -Qkk openvpn
openvpn: 89 total files, 0 altered file

Offline

#8 2024-12-24 06:38:52

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [solved] openvpn missing systemd support

jeoz wrote:

6. enable openvpn systemd service <=. fail, does not exits.

Exactly what command did you use for enabling the systemd service?

Offline

#9 2024-12-24 07:33:27

jeoz
Member
Registered: 2024-12-23
Posts: 6

Re: [solved] openvpn missing systemd support

-thc wrote:
jeoz wrote:

6. enable openvpn systemd service <=. fail, does not exits.

Exactly what command did you use for enabling the systemd service?

previously I got does not exist. Now doing same in answering your question, I get the below. Maybe I made some typo previously and didn't notice it leading me check using list-units where I don't see any openvpn services.

# systemctl enable openvpn-server@.service
Failed to enable unit: Refusing to operate on template unit openvpn-server@.service when destination unit multi-user.target is a non-template unit

Last edited by jeoz (2024-12-24 07:36:19)

Offline

#10 2024-12-24 09:29:03

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [solved] openvpn missing systemd support

O.K. - you probably don't know that this systemd unit is a multi-instance unit that needs an instance name (the name of the conf-file):

systemctl enable openvpn-server@server.service

Offline

#11 2024-12-24 12:02:12

jeoz
Member
Registered: 2024-12-23
Posts: 6

Re: [solved] openvpn missing systemd support

-thc wrote:

O.K. - you probably don't know that this systemd unit is a multi-instance unit that needs an instance name (the name of the conf-file):

systemctl enable openvpn-server@server.service

Thank you!!!!! This solved the problem of the missing service. The "enable" created the service with the appropriate name.

Regards

Offline

#12 2024-12-24 12:49:28

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [solved] openvpn missing systemd support

smile  Please mark your thread "[solved]" by editing your initial posting.

Offline

Board footer

Powered by FluxBB