I'm setting up an OpenVPN server on Kali. When the service is started, this error occurs:
Job for [email protected] failed because the control process exited with error code. See "systemctl status [email protected]" and "journalctl -xeu [email protected]" for details.
Running journalctl, there's not much information about the error:
Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit [email protected] has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Nov 28 15:14:46 hubbles systemd[1]: [email protected]: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit [email protected] has entered the 'failed' state with result 'exit-code'.
Nov 28 15:14:46 hubbles systemd[1]: Failed to start [email protected] - OpenVPN service for server.
░░ Subject: A start job for unit [email protected] has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit [email protected] has finished with a failure.
░░
░░ The job identifier is 164596 and the job result is failed.
Let me show the config file:
port 1194
proto udp
dev tun
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dchp-option DNS 8.8.8.8"
push "dchp-option DNS 8.8.4.4"
push "redirect-gateway def1 bypass-dhcp"
dh /etc/openvpn/server/dh.pem
ecdh-curve prime256v1
ca /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/hubbles.crt
key /etc/openvpn/server/ca.key
auth SHA256
cipher AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
status /var/log/openvpn/status.log
verb 3
This exact configuration works on a friend's computer, whilst I can't run it. I had run restorecon -Rv /etc/openvpn/
and restarted the service over, but still not luck. What am I doing wrong?
I started the whole process over and over, checked the keys are stored in the specified directory and stopped/started the service.
/var/log/openvpn/status.log
? What are the permissions on the key files?