Skip to content

Instantly share code, notes, and snippets.

@manchot0
Created December 12, 2019 09:27
Show Gist options
  • Save manchot0/2023c1506276ac2cf04a0e84cbdc5f99 to your computer and use it in GitHub Desktop.
Save manchot0/2023c1506276ac2cf04a0e84cbdc5f99 to your computer and use it in GitHub Desktop.
systemd sandboxing
User=
Group=
UMask=
RuntimeDirectory=
RuntimeDirectoryMode=
CPUQuota=100%
PrivateTmp=true
PrivateDevices=true
ProtectSystem=strict
PrivateUsers=
RootDirectory=
BindPaths=
BindReadOnlyPaths=
ReadWritePaths=
ReadOnlyPaths=
InaccessiblePaths=
#available in systemd 238
#TemporaryFileSystem=
RestrictRealtime=true
RestrictNamespaces=true
#available in systemd 242
#RestrictSUIDSGID=true
ProtectHome=true
MemoryDenyWriteExecute=true
ProtectKernelTunables=true
ProtectKernelModules=true
#available in systemd 244
#ProtectKernelLogs=true
ProtectControlGroups=true
#Empty string reset to empty capability set
CapabilityBoundingSet=
SystemCallErrorNumber=EPERM
SystemCallFilter=~@chown @clock @debug @keyring @module @mount @obsolete @privileged @reboot @setuid @swap @cpu-emulation @raw-io
SystemCallFilter=~ptrace
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
SystemCallArchitectures=native
NoNewPrivileges=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment