Linux – Not seeing OpenVPN running or errors

debianlinuxopenvpn

 systemctl status openvpn
● openvpn.service - OpenVPN service
   Loaded: loaded (/lib/systemd/system/openvpn.service; enabled)
   Active: active (exited) since Thu 2017-02-16 15:11:44 EST; 22h ago
  Process: 29607 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 29607 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/openvpn.service

and

Feb 16 15:11:44 server.local systemd[1]: Started OpenVPN service.
Feb 16 15:15:20 server.local systemd[1]: Started OpenVPN service.
Feb 16 15:15:47 server.local systemd[1]: Started OpenVPN service.
Feb 16 15:22:37 server.local systemd[1]: Started OpenVPN service.
Feb 16 15:23:44 server.local systemd[1]: Started OpenVPN service.
Feb 17 13:36:16 server.local systemd[1]: Started OpenVPN service.

and

I've looked in /var/log/syslog and don't see anything. I've checked in /etc/openvpn for logs and nothing.

Config:

local 0.0.0.0
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
client-to-client
duplicate-cn
keepalive 10 120
comp-lzo
max-clients 100
user root
group root
persist-key
persist-tun
status openvpn-status.log
log         openvpn.log
log-append  openvpn.log
verb 9
mute 20

How can I figure out why it will not start?

This is:

cat /etc/debian_version
8.7

Best Answer

Like nearly every other of systemctl's .service files, one can find the relevant openvpn .service files in /lib/systemd/system.

As explained by openvpn's service file located at /lib/systemd/system/openvpn.service:

# This service is actually a systemd target,
# but we are using a service since targets cannot be reloaded.

One instead finds the proper .service file in openvpn@.service, indicating that he should start the openvpn service under his desired user with systemctl start openvpn@whicheveruser.service and enable the openvpn service with systemctl enable openvpn@whicheveruser.service.

The default openvpn@.service loads its configuration from /etc/openvpn/whicheveruser.conf. If one wants to change this, perhaps to /etc/openvpn/server.conf, he should alter openvpn@.service's ExecStart command to his preference.