I have a VPS in the cloud running Debian 11 and I installed OpenVPN on it with apt. I have generated the security files on another system and moved them all into /etc/openvpn. Since I'm just getting started with OpenVPN, I've also put my files in /etc/openvpn/server. I have ca.cert, ta.key, dh.pem, <servername>.cert, and <servername>.key (Of course, the real server name replaces <servername>.) Also in both those directories, I have server.conf. I'm starting OpenVPN as root with the command
Code: Select all
openvpn /etc/openvpn/server.conf
Code: Select all
ta.key 0 # This file is secret
Code: Select all
tls-auth /etc/openvpn/ta.key 0 # This file is secret just to see
Here's what happens whenever I try to run OpenVPN:
Code: Select all
[23-04-20 2:21:57 root@shadowyseas ~] $ openvpn /etc/openvpn/server.conf
2023-04-20 02:22:18 Cannot pre-load keyfile (ta.key)
2023-04-20 02:22:18 Exiting due to fatal error
At this point, I can't find anything to clearly tell me what directory OpenVPN expects this file to be in, whether the location should be specified in the config file, and I don't even know if the error is due to the file location, an unspecified path, or if there's a problem with the file itself. I can't even find a way to get more debugging information from the log. (It doesn't seem to be keeping a log - nothing in /var/log/openvpn.) All I have is the information displayed on the console when I try to run OpenVPN.