OpenVPN will not start

I have installed openVPN server on my virtual private server running virtualmin/webmin over debian 10. I installed the third party module and followed instructions from a variety of sources as there is not one that is specific for the webmin setup. Found a YouTube video that was helpful but am only halfway through as I cannot get the server to start. I need some help to get it going before producing client configurations. I have rebooted the server to make sure configurations files are properly read but each time I try to start the server I get the following outputs:

root@contabo:~# systemctl start openvpn@xtcinxs-openvpn
root@contabo:~# systemctl status openvpn@xtcinxs-openvpn
● openvpn@xtcinxs-openvpn.service - OpenVPN connection to xtcinxs-openvpn
Loaded: loaded (/lib/systemd/system/openvpn@.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2020-04-30 01:03:47 CEST; 2s ago
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 18149 ExecStart=/usr/sbin/openvpn --daemon ovpn-xtcinxs-openvpn --status /run/openvpn/xtcinxs-openvpn.status 10 --cd /etc/openvpn --config /etc/openvpn/xtcinxs-openvpn.conf --writepid /run/openvpn/xtcinxs-openvpn.pid (code=exited, status=1/FAILURE)
Main PID: 18149 (code=exited, status=1/FAILURE)
Status: “Pre-connection initialization successful”

Apr 30 01:03:47 contabo.xtcinxs.site systemd[1]: openvpn@xtcinxs-openvpn.service: Main process exited, code=exited, status=1/FAILURE
Apr 30 01:03:47 contabo.xtcinxs.site systemd[1]: openvpn@xtcinxs-openvpn.service: Failed with result ‘exit-code’.

and

root@contabo:~# openvpn --config /etc/openvpn/xtcinxs-openvpn.conf
Thu Apr 30 01:32:57 2020 Warning: Error redirecting stdout/stderr to --log file: servers/xtcinxs-openvpn/logs/openvpn.log: No such file or directory (errno=2)
Options error: --dh fails with ‘keys/xtcinxs/dh2048.pem’: No such file or directory (errno=2)
Options error: --ca fails with ‘keys/xtcinxs/ca.crt’: No such file or directory (errno=2)
Options error: --cert fails with ‘keys/xtcinxs/xtcinxs-server.crt’: No such file or directory (errno=2)
Thu Apr 30 01:32:57 2020 WARNING: cannot stat file ‘keys/xtcinxs/xtcinxs-server.key’: No such file or directory (errno=2)
Options error: --key fails with ‘keys/xtcinxs/xtcinxs-server.key’: No such file or directory (errno=2)
Options error: --crl-verify fails with ‘keys/xtcinxs/crl.pem’: No such file or directory (errno=2)
Options error: --status fails with ‘servers/xtcinxs-openvpn/logs/openvpn-status.log’: No such file or directory (errno=2)
Options error: Please correct these errors.
Use --help for more information.

All the files it says it cannot access exist and are owned by root:root with permissions of 755 yet openvpn cannot see them to use them.

Is there a change I need to make in the config file to get this to start?

Thanks for any help

Geoff

This was all a bit messy. Uninstalled and deleted the openvpn directory in /etc. Reinstalled and tried again checking each action via the config files. The paths in the config files needed changing (to explicit references such as /etc/openvpn/etc.and I also had to move some of the certificates to get it working. I can now connect to the vpn server from my remote Mac but it cannot resolve and access any site. Forwarding is on but I need to add a rule to the firewall I think. Problem is I cannot see how to do it. The rule is:
-A POSTROUTING -s 10.8.0.0/8 -o eth0 -j MASQUERADE
and there are lots of examples for uff but I cannot find how to do it using Firewalld. I am reading the guides but it is somewhat complex. Can anyone help me please?

Also, everything I read tells me that Buster uses notables as the default but my server is set to iptables. Should I worry? Should I go through the process of changing?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.