You are here
Tamas Pisch - Wed, 2020/11/25 - 14:26
Hi,
I installed Turnkey Openvpn V16.0 appliance. I set up server mode on the A site, and created client configuration with confconsole. I copied the xyz.ovpn file to the appliance on B site as /etc/opencpn/xyz.conf. On B site, I set up the appliance as client.
I set up autorun in /etc/default/openvpn:
AUTOSTART="xyz"
After restart, I see error message in log:
...error opening configuration file /etc/openvpn/server.conf
Ok, I don't have /etc/openvpn/server.conf on the client site. Do I need it? If yes, how I create/fill in it? If I don't need it, how can I avoid that error message?
openvpn --config /etc/openvpn/xyz.conf
works, at least I don't get the above error message.
Forum:
Tags:
That's the old way that is no longer current...
FWIW the info about enabling the client OpenVPN service that you're following is the old way things were done back when sysvinit was the init system. TurnKey now uses systemd so that process is no longer relevant. Whilst the "openvpn" service still exists, it's actually a dummy service that will just create a server instance. OpenVPN now uses systemd templates to provide the relevant client service.
Most of the process reamins the same, just the actual commands to start the client service have changed. So in the case of your client, you've done exactly the right thing copying the xyz.ovpn file to the client appliance /etc/opencpn/xyz.conf. The bit you are missing, is to enable and start the new OpenVPN client service from the OpenVPN systemd template. The below will enable & start a new client service using the /etc/opencpn/xyz.conf file (change 'xyz' to be the real name of your conf file):
If you wish to checkout what it's up to, you can check it's status like this:
Or for the full output, you can read the journal:
I hope that helps.
PS I also noted that our docs are out of date and include the old sysvinit commands too, so I've updated them.
Thank you for your answer, it
Thank you for your answer, it helped me.
Add new comment