Version 3 (modified by 6 years ago) (diff) | ,
---|
OpenVPN systemd integration
This is only a brief summary of OpenVPN systemd integration.
If you use systemd then OpenVPN must be compiled with systemd support.
Build OpenVPN with systemd support
When you build the openvpn binary use the configure option --enable-systemd
like so:
./configure --enable-systemd
Verify OpenVPN systemd support has been enabled like so:
$ openvpn --version
Look for
enable-systemd=yes
in the output.
Using OpenVPN with systemd support
In order to use OpenVPN with systemd please use the correct systemd .service
file.
Openvpn server:
- Place your server configuration file in
/etc/openvpn/server
- Use the
openvpn-server@.service
like so:$ sudo systemctl start openvpn-server@{server-config}
Openvpn client:
- Place your client configuration file in
/etc/openvpn/client
- Use the
openvpn-client@.service
like so:$ sudo systemctl start openvpn-server@{client-config}
Start at boot:
Replace
start
withenable
Note:
openvpn@.service
is deprecated.openvpn.service
is only used for backward compatibility.
Known issues
Please see: https://community.openvpn.net/openvpn/ticket/945