Skip to content

Instantly share code, notes, and snippets.

@brandsimon
Last active August 26, 2019 23:37
Show Gist options
  • Save brandsimon/604ebafc5b203ab47e2b8255e2181cc7 to your computer and use it in GitHub Desktop.
Save brandsimon/604ebafc5b203ab47e2b8255e2181cc7 to your computer and use it in GitHub Desktop.
VPNC Systemd Service
[Unit]
Description=VPNC connection to %i
# After=network-online.target
# Wants=network-online.target
[Service]
Type=forking
ExecStart=/usr/sbin/vpnc --pid-file=/run/vpnc@%i.pid /etc/vpnc/%i.conf
PIDFile=/run/vpnc@%i.pid
RestartSec=30
Restart=always
NoNewPrivileges=yes
RestrictRealtime=yes
ProtectHome=yes
InaccessibleDirectories=/home
PrivateTmp=yes
MemoryDenyWriteExecute=yes
RestrictNamespaces=yes
RemoveIPC=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment