Skip to content

Instantly share code, notes, and snippets.

@panakuma
Created October 7, 2019 11:22
Show Gist options
  • Save panakuma/0e7b4470c7451cb99c32af95755ec19c to your computer and use it in GitHub Desktop.
Save panakuma/0e7b4470c7451cb99c32af95755ec19c to your computer and use it in GitHub Desktop.
SoftEther VPN Serverのserviceファイル
[Unit]
Description=SoftEther VPN Server
After=network.target auditd.service
ConditionPathExists=!/opt/vpnserver/do_not_run
[Service]
Type=forking
EnvironmentFile=-/opt/vpnserver
ExecStart=/opt/vpnserver/vpnserver start
ExecStop=/opt/vpnserver/vpnserver stop
KillMode=process
Restart=on-failure
# Hardening
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full
ReadOnlyDirectories=/
ReadWriteDirectories=-/opt/vpnserver
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment