-
Notifications
You must be signed in to change notification settings - Fork 6
/
template.conf
70 lines (57 loc) · 1.41 KB
/
template.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[Service]
##############
# Networking #
##############
PrivateNetwork=yes
RestrictAddressFamilies=AF_UNIX
IPAccounting=yes
# IPAddressAllow= service does not require access to any IP addresses
IPAddressDeny=any
###############
# File system #
###############
# Note that the effect of these settings may be undone by privileged processes. In order to
# set up an effective sandboxed environment for a unit it is thus recommended to combine
# these settings with either CapabilityBoundingSet=~CAP_SYS_ADMIN or
# SystemCallFilter=~@mount.
ProtectHome=yes
ProtectSystem=strict
ReadWritePaths=-/example/path
PrivateTmp=yes
###################
# User separation #
###################
# PrivateUsers= service runs as root
# DynamicUser= service runs as root
###########
# Devices #
###########
PrivateDevices=yes
DeviceAllow=/dev/exampledevice
##########
# Kernel #
##########
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
########
# Misc #
########
CapabilityBoundingSet=
# AmbientCapabilities= service runs as root
NoNewPrivileges=yes
ProtectHostname=yes
ProtectClock=yes
ProtectControlGroups=yes
RestrictNamespaces=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
# RemoveIPC= service runs as root
################
# System calls #
################
SystemCallFilter=@system-service
SystemCallFilter=~@resources @privileged
SystemCallArchitectures=native