openvpn-server@.service.in 824 B

12345678910111213141516171819202122232425
  1. [Unit]
  2. Description=OpenVPN service for %I
  3. After=syslog.target network-online.target
  4. Wants=network-online.target
  5. Documentation=man:openvpn(8)
  6. Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
  7. Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO
  8. [Service]
  9. Type=notify
  10. PrivateTmp=true
  11. WorkingDirectory=/etc/openvpn/server
  12. ExecStart=@sbindir@/openvpn --status %t/openvpn-server/status-%i.log --status-version 2 --suppress-timestamps --config %i.conf
  13. CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
  14. LimitNPROC=10
  15. DeviceAllow=/dev/null rw
  16. DeviceAllow=/dev/net/tun rw
  17. ProtectSystem=true
  18. ProtectHome=true
  19. KillMode=process
  20. RestartSec=5s
  21. Restart=on-failure
  22. [Install]
  23. WantedBy=multi-user.target