You are not logged in.
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
Jin, Jîyan, Azadî
Offline
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
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
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
ls /usr/lib/systemd/system/openvpn-server@.service
pacman -Qkk openvpnSakura:-
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
/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 fileOffline
6. enable openvpn systemd service <=. fail, does not exits.
Exactly what command did you use for enabling the systemd service?
Offline
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 unitLast edited by jeoz (2024-12-24 07:36:19)
Offline
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.serviceOffline
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
Please mark your thread "[solved]" by editing your initial posting.
Offline