1

I have question about openVpn service. I want to disable the openVpn service, but I wonder what is the difference between "sudo systemctl disable openvpn@client.service" and "sudo systemctl disable openvpn"?

systemctl list-units | grep openvpn

and I get

openvpn.service                 loaded active exited    OpenVPN service        
openvpn@client.service          loaded active running   OpenVPN connection to client                                                 
system-openvpn.slice            loaded active active    system-openvpn.slice   

1 Answer 1

1

openvpn.service is mainly a historical leftover. Basically, it imitates /etc/init.d/openvpn for people who were used to older Debian versions having a single service that controls multiple VPN configurations in one shot, whereas the systemd approach is to have a separate "openvpn@foo.sevice" instance for each individual configuration.

In other words, the service doesn't start anything its own – its only purpose is to aggregate all openvpn@... instances. If you run systemctl cat openvpn@.service you'll see that it references openvpn.service, so systemctl reload openvpn would propagate the reload to all openvpn@... instances that you have running.


However, note that Debian's custom openvpn@.service is actually being replaced by the newer openvpn-client@.service and openvpn-server@.service units which come directly from OpenVPN itself. Those two service units are also multiple-instance, but they don't reference the "central" openvpn.service at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.