Advertisement
Guest User

Untitled

a guest
Feb 1st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. $ systemctl cat openvpn@.service
  2. # /lib/systemd/system/openvpn@.service
  3. [Unit]
  4. Description=OpenVPN connection to %i
  5. PartOf=openvpn.service
  6. ReloadPropagatedFrom=openvpn.service
  7. Before=systemd-user-sessions.service
  8. Documentation=man:openvpn(8)
  9. Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage
  10. Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO
  11.  
  12. [Service]
  13. PrivateTmp=true
  14. KillMode=mixed
  15. Type=forking
  16. ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/%i.conf --writepid /run/openvpn/%i.pid
  17. PIDFile=/run/openvpn/%i.pid
  18. ExecReload=/bin/kill -HUP $MAINPID
  19. WorkingDirectory=/etc/openvpn
  20. ProtectSystem=yes
  21. 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
  22. LimitNPROC=10
  23. DeviceAllow=/dev/null rw
  24. DeviceAllow=/dev/net/tun rw
  25.  
  26. [Install]
  27. WantedBy=multi-user.target
  28.  
  29.  
  30.  
  31. # /etc/systemd/system/openvpn@.service.d/override.conf
  32. [Service]
  33. Restart=always
  34. RestartSec=30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement