OpenVPN don't start: --cert fails with 'client.crt': No such file or directory
Solution 1:
Use absolute path to point where each certificate/key is:
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
You can also start the OpenVPN server invoking it's own binary.
openvpn --config /etc/openvpn/server.conf --daemon
As roaima said, you must change the extension of your "client.conf" and any other "*.conf" file before using the CentOS startup script.
Solution 2:
Your problem is that the service startup file for CentOS will try to run any config file that's in /etc/openvpn
- after all, it has no way of knowing which was the intended config file.
Delete the client.conf
file that's hanging around in that directory, or as raoima suggests move it to one side, and the openvpn startup script will stop trying to invoke it.