Quantcast
Channel: Active questions tagged openvpn - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 823

Self-compiled OpenVPN won't start from systemd

$
0
0

I have compiled openvpn from source, running openvpn --version returns:

OpenVPN 2.4.4 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Nov 19 2017library versions: OpenSSL 1.0.2g  1 Mar 2016, LZO 2.08

And created a /etc/openvpn/server.conf file with some basic settings. However, when I try to start it with sudo systemctl start openvpn@server it returns

Failed to start openvpn@server.service: Unit openvpn@server.service not found.

And sudo systemctl status openvpn returns:

● openvpn.service   Loaded: masked (/dev/null; bad)   Active: inactive (dead) since Sun 2017-11-19 14:21:06 HKT; 4 days ago Main PID: 1502 (code=exited, status=0/SUCCESS)

Which makes me think that openvpn service is not even registered.

I have checked /lib/systemd/system/, it doesn't have openvpn.service file, but /etc/systemd/system/ does. As I understand this is because I compiled instead of apt-get install openvpn?

Can anyone suggest how should I add self-compiled openvpn as a service?

First time compiling from source, so any advise/tips much appreciated!

EDIT 1:

I can start openvpn server and connect clients to it with (only service doesn't seem to work):

sudo openvpn /etc/openvpn/server.conf

Viewing all articles
Browse latest Browse all 823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>