openvpn@.service 857 Bytes
Newer Older
1 2
[Unit]
Description=OpenVPN connection to %i
3 4
PartOf=openvpn.service
ReloadPropagatedFrom=openvpn.service
5 6 7
Documentation=man:openvpn(8)
Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage
Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO
8 9

[Service]
10 11
PrivateTmp=true
KillMode=mixed
12
Type=forking
Alberto Gonzalez Iniesta's avatar
Alberto Gonzalez Iniesta committed
13 14
ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --config /etc/openvpn/%i.conf --writepid /run/openvpn/%i.pid
PIDFile=/run/openvpn/%i.pid
15
ExecReload=/bin/kill -HUP $MAINPID
16
WorkingDirectory=/etc/openvpn
17
ProtectSystem=yes
Alberto Gonzalez Iniesta's avatar
Alberto Gonzalez Iniesta committed
18
CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_READ_SEARCH CAP_AUDIT_WRITE
19
LimitNPROC=10
20 21
DeviceAllow=/dev/null rw
DeviceAllow=/dev/net/tun rw
22 23 24 25 26

[Install]
WantedBy=multi-user.target