Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3560

System and Network configuration • OpenVPN works from command line, but not the service.

$
0
0
Thank you very much @reinob for your reply.

I can not do that exact command:

Code:

>>> sudo systemctl enable server@openvpnFailed to enable unit: Unit file server@openvpn.service does not exist.
I read that the syntax to be used by systemctl to load a configuration file should be:

Code:

systemctl openvpn@<name of conf file in /etc/openvpn/>.service

I stopped and disabled everything regarding openvpn:

Code:

>>> sudo systemctl stop openvpn[now pressing the tab key]          ===> openvpn@server.service  openvpn.service         >>> sudo systemctl stop openvpn@server.service 🔐 Enter Private Key Password: ***********             >>> sudo systemctl stop openvpn.service >>> sudo systemctl disable openvpn.serviceSynchronizing state of openvpn.service with SysV service script with /lib/systemd/systemd-sysv-install.Executing: /lib/systemd/systemd-sysv-install disable openvpn>>> sudo systemctl disable openvpn@server.service
Then I started and enabled openvpn services:

Code:

>>> sudo systemctl start openvpn.service #the only possible available service begining with "openvpn" according to the 'tab key' checking.
Now checking what other services are available with the tab key method:

Code:

>>> sudo systemctl start openvpn[pressing tab]

Code:

>>> sudo systemctl start ovpn[pressing tab]
But no service candidates show.

Then I checked candidates to be enabled:

Code:

>>> sudo systemctl enable openvpn            openvpn@                 openvpn-client@.service  openvpn-server@.service            openvpn-client@          openvpn-server@          openvpn.service
I enable openvpn.service

Code:

>>> sudo systemctl enable openvpnSynchronizing state of openvpn.service with SysV service script with /lib/systemd/systemd-sysv-install.Executing: /lib/systemd/systemd-sysv-install enable openvpn

If I try enabling openvpn-server@.service

Code:

>>> sudo systemctl enable openvpn-server@.service Failed to enable unit: Destination unit multi-user.target is a non-template unit.
Now the only services that I could restart or disable, with the tab method starting with openv, are:

Code:

>>> sudo systemctl restart openv[pressing tab]            openvpn@server.service  openvpn.service  
And I already stopped, enabled and start those services several times today. Others were lucky just doing that with openvpn@server.service, see this post.

I am following now these:
https://serverfault.com/questions/89181 ... onfig-file
https://askubuntu.com/questions/747023/ ... -container

Statistics: Posted by anndreih — 2025-02-09 07:46 — Replies 3 — Views 112



Viewing all articles
Browse latest Browse all 3560

Trending Articles