Created
April 25, 2020 05:38
-
-
Save brian9206/2a6906fdd31dca18aa431e121c4d6c18 to your computer and use it in GitHub Desktop.
/usr/lib/systemd/system/[email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=OpenVPN tunnel for %I | |
After=syslog.target network-online.target | |
[email protected] | |
Wants=network-online.target | |
[email protected] | |
[Service] | |
Type=notify | |
PrivateTmp=true | |
WorkingDirectory=/etc/openvpn/client | |
ExecStart=/usr/sbin/openvpn --suppress-timestamps --nobind --config %i.conf | |
#ExecStartPost=/bin/sleep 2 | |
#ExecStartPost=/sbin/dhclient %i | |
#ExecStopPre=-/sbin/dhclient -x %i | |
CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_SYS_ADMIN CAP_NET_BIND_SERVICE | |
LimitNPROC=10 | |
DeviceAllow=/dev/null rw | |
DeviceAllow=/dev/net/tun rw | |
ProtectSystem=true | |
ProtectHome=true | |
KillMode=process | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment