summarylogtreecommitdiffstats
path: root/mcrevproxy.service
blob: fca37816c5203487e47b73e14e624795019b6fa2 (plain)
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
[Unit]
Description=mcrevproxy daemon
After=network.service

[Service]
DynamicUser=yes
# Default Values
Environment=mcrevproxyargs="server1.localhost=:25566 server2.localhost=192.168.2.100"
# Optional Override
EnvironmentFile=-/etc/mcrevproxy.conf
ExecStart=/usr/bin/mcrevproxy ${mcrevproxyargs}
#ExecStart=/usr/bin/mcrevproxy $SCRIPT_ARGS

# Hardening
DeviceAllow=
LockPersonality=yes
#MemoryDenyWriteExecute=yes
PrivateDevices=yes
ProcSubset=pid
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
#RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service ~@privileged ~@resources
UMask=0077
CapabilityBoundingSet=~CAP_SYS_CHROOT
CapabilityBoundingSet=~CAP_SYS_BOOT
CapabilityBoundingSet=~CAP_SYS_PTRACE
CapabilityBoundingSet=~CAP_SYS_ADMIN
CapabilityBoundingSet=~CAP_KILL
CapabilityBoundingSet=~CAP_LINUX_IMMUTABLE
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND
CapabilityBoundingSet=~CAP_SYS_NICE
CapabilityBoundingSet=~CAP_SYS_RESOURCE
CapabilityBoundingSet=~CAP_CHOWN
CapabilityBoundingSet=~CAP_FSETID
CapabilityBoundingSet=~CAP_SETFCAP

PrivateUsers=true

[Install]
WantedBy=default.target